website logo
Product Overview
NetSuite
Payments
QuickBooks
Xero
Navigate through spaces
⌘K
General Concepts
What is Breadwinner
Getting Started
App Installation
Initial Configuration
Person Accounts
Company Matching
Product Matching
NetSuite Items and Item Groups
Download PDF button
Weekly Sync Timeframe
Security and Permissions
NetSuite Permissions
Custom Guided Wizard
Quick Create Sales Order
Button URL Structure
NetSuite Company Creation
Button URL Generator
Support
Custom Fields
Custom Objects
Global API
Quick Start Guide
API Overview
Requests
Response
Apex Generator
Code Examples
Advanced Topics
Formula Fields
NetSuite Discounts
NetSuite Payment Terms
Memorized Transactions
Sync Data Filtering
Technical Resources
Deploy Plan
Requirements
ERD / Object Structure
Getting Help
Version History
Direct Installation Link
Docs powered by
Archbee
Global API
...
Requests
Sales Order

Read

3min

To read Sales Orders, please use the below parameters.

Supported “where” Filters

Field Name

Data Type

Description

dateCreated

Long

This will filter on an exact match (equal). Use the “additionalFilter” option for a range of dates.

internalId

String

Internal ID of the Sales Order. Multiple values can be passed in a comma-separated string.

lastModifiedDate

Long

This will filter on an exact match (equal). Use the “additionalFilter” option for a range of dates.

subsidiary

String

Internal ID of Subsidiary (Primary). Do Not Use this in additonalFilter. Multiple IDs can be passed in a comma-separated string Ex: 1,2

additonalFilter

String

construct the additional filter with a combination of the above fields using ‘+and+’ separator and pass it as a single string. Make sure to wrap the whole string using EncodingUtil.urlEncode

tranDate

Long

Transaction date of the record. Use the “additionalFilter” option for a range of dates.

customer

String

To filter the records based on the Customer. Multiple IDs can be passed in a comma-separated string Ex: 6,7

Example

Request
Response
|
Map<String, Object> filters = new Map<String, Object>();
filters.put('subsidiary', '1,2');
filters.put('additionalFilter', EncodingUtil.urlEncode('lastModifiedDate>1628091060+and+lastModifiedDate<1629127860', 'UTF-8')); 
// Encode additionalFilter after constructing it with +and+ for multi-filters

// field filters and additionalFilter for where param
Map<String, Object> filterMap = new Map<String, Object>();
filterMap.put('where', new Map<String, Object>{'keyValueMap'=>filters}); 

Map<String, Object> requestJSONMap = new Map<String, Object>();
requestJSONMap.put('customParameters', filterMap);

String reqJSON = JSON.serialize(requestJSONMap);

Map<String, Object> reqObj = new Map<String, Object>();
reqObj.put('version', '1.0');
reqObj.put('action', 'readSalesOrder');
reqObj.put('requestJSON', reqJSON);

//  Place a request to Breadwinner Global API
Map<String, Object> resp = breadwinner_ns.BreadwinnerNetSuiteAPI.call(reqObj);
System.debug(resp);




Updated 20 Jun 2023
Did this page help you?
PREVIOUS
Sales Order
NEXT
Create
Docs powered by
Archbee
TABLE OF CONTENTS
Supported “where” Filters
Example
Docs powered by
Archbee