Author: Avatansh Sharma
Below article talks about Get Select Value connector of Netsuite with the help of record type, field name, field value and a filter.
Before moving forward, it is advised that you refer below links to get an overview of Netsuite Connector V11 and to understand the basic configuration for setting up a Netsuite Connector V11 in Mule 4.
Please confirm below two points.
- In the pom.xml file of the Mule project, check that the NetSuite Connector dependency version is 11. X.x.
- Test connection with NetSuite is successful.
NetSuite Operations
GET SELECT VALUE – Returns valid select options for a particular RecordRef, CustomRecordRef or enumerated static field. Internal ID, External ID or Name of field can also be used along with filters and record type to get more precise results.
Record Type– The type of record in NetSuite on which we want to operate like, invoice. This is an optional field.
Field – The name of the field for which we want to get the select value. For example, a field with dropdown list values on a record type. This is an optional field.
Filter – The type of filter operator we want to apply on the field like, is, contains etc,. This is an optional field.
Filter Value – The value from the list of available values for that field on that record. For example, a particular value from the dropdown list. This is an optional field.
Other parameters/ways to get the select value for a field.
Use case 1: Get Select Value for Line of Business
- Drag a HTTP listener and configure the http connection with desired host and port.
- A Transform Message Component to form the request payload that will be sent to Netsuite.
- Get Select Value Operation from NetSuite module/palette.
- Transform Message to convert response from Netsuite to JSON with writeAttributes=true.
Flow for getting the select value for a field on record type with “is” fitler and one of the option values for that field on that record.
The XML request to get select value for a field on a particular record
- Both 2020_1 and 2020_2 in the namespace will work, make sure that the port passed in namespaces should be the same as the SOAP port in NetSuite Config.
- Namespaces are automatically generated using DataSense Explorer, but one might need to add some namespaces which are used in SOAP requests (Debug logs can be referred to get them).
Note: You can also get all available options for that field with respective select values by just providing record type and field name.
Select the connector configuration, specify page size (default 10).
Convert the response to JSON.