Skip to Content

Connector Functions

NetSuite Connector Functions

These functions are for use with the Jitterbit NetSuite Connector:

NetSuiteGetSelectValue

Declaration

dictionary NetSuiteGetSelectValue(string netSuiteOrg, string recordType, string field[, string sublist])

Syntax

NetSuiteGetSelectValue(<netSuiteOrg>, <recordType>, <field>[, <sublist>])

Required Parameters

Optional Parameters

  • sublist: NetSuite sublist

Description

Retrieves the picklist values for a field from NetSuite.

The function response is a dictionary (map), where:

  • The dictionary keys are the picklist values.
  • The dictionary values are a map with two elements: the internal ID and the external ID for each picklist.

Note

The return value should be assigned to a variable and the variable should be used for retrieving corresponding IDs for picklist elements instead of calling this function multiple times.

Note

If sublist is given inappropriately, you may get

ERROR code=INSUFFICIENT_PERMISSION;message=You do not have permissions to set a value for element cef records

due to any of these reasons:

  • The field is read-only.
  • An associated feature is disabled.
  • The field is available either when a record is created or updated, but not in both cases.

Examples

Script Example

netSuiteOrg = "<TAG>NetSuite Endpoints/NetSuite Endpoint</TAG>";
recordType = "customer";
field = "entityStatus";
dict = NetSuiteGetSelectValue(netSuiteOrg, recordType, field);
i1=dict[field]["internalId"]; // or dict[field][0]
e1=dict[field]["externalId"]; // or dict[field][1]

Picklist Example

  1. Go to NetSuite's SOAP Schema Browser for the version of NetSuite WSDL you are using. This example uses the 2021.1 SOAP Schema Browser.

  2. Go to the Records Browser tab and navigate to the Customer record type. The resulting page displays the customer record table showing the structure of the customer record, including its field names and field types. Record types are case-sensitive.

  3. In the Name column of the customer record table, locate the field name entityStatus. This corresponds with the field entityStatus shown in the schema of a NetSuite Connector Search activity. You can preview the values for this field for when testing a transformation using this schema.

  4. To retrieve all the picklist values for the field entityStatus under the customer record type, use a script:

    netSuiteOrg = "<TAG>NetSuite Endpoints/Test NetSuite Endpoint</TAG>";
    recordType = "customer";
    field = "entityStatus";
    d = NetSuiteGetSelectValue(netsuiteOrg, recordType, field);
    keys = GetKeys(d);
    $cw.internalId = d[keys[0]]["internalId"];
    $cw.externalId = d[keys[0]]["externalId"];
    keys
    

    This script will return a list of keys:

    {CUSTOMER-Closed Won,CUSTOMER-Lost Customer,CUSTOMER-Renewal}
    
  5. You can then test the script to see the internal and external IDs for each of the picklist entries.

NetSuiteGetServerTime

Declaration

string NetSuiteGetServerTime(string netSuiteOrg)

Syntax

NetSuiteGetServerTime(<netSuiteOrg>)

Required Parameters

Description

Retrieves the server date-time from a NetSuite server.

Examples

netSuiteOrg = "<TAG>NetSuite Endpoints/NetSuite Endpoint</TAG>";
NetSuiteGetServerTime(netSuiteOrg);
// Returns a date such as "2017-12-07T21:00:26.000-08:00"

NetSuiteLogin

Declaration

string NetSuiteLogin(string netSuiteOrg)

Syntax

NetSuiteLogin(<netSuiteOrg>)

Required Parameters

Description

Retrieves a new session ID from a NetSuite endpoint for use in REST or SOAP calls that are not included in the NetSuite Connector. This provides a simple way to log into NetSuite without requiring authentication headers for each web service call.

Note

Use of this function is not required if you are using a Jitterbit NetSuite Connector.

Warning

The NetSuite session expires after 15 minutes. It may be invalidated by other calls to NetSuite.

Examples

netSuiteOrg = "<TAG>NetSuite Endpoints/NetSuite Endpoint</TAG>";
NetSuiteLogin(netSuiteOrg);
// Returns a string such as
// "JSESSIONID=_wXox...847; path=/; HttpOnly;NS_ROUTING_VERSION=LAGGING; path=/;NS_VER=2017.2.0; path=/"

PLM360 Connector Functions

These functions are for use with the Jitterbit Autodesk Lifecycle Connector (formerly Autodesk PLM360):

Note

Autodesk Fusion Lifecycle was formerly known as Autodesk PLM360, hence the naming convention of these functions.

PLM360GetItemVersionId

Declaration

string PLM360GetItemVersionId(string plm360Org, int workspaceId, int dmsId)

Syntax

PLM360GetItemVersionId(<plm360Org>, <workspaceId>, <dmsId>)

Required Parameters

Description

Logs in to Fusion Lifecycle and returns the version ID of an item with id=dmsId in the given workspaceId. Returns an empty string if the item is unavailable.

Note

The running system will automatically log in if it is not already logged in. It will log in again if the saved session ID becomes invalid.

PLM360Login

Declaration

string PLM360Login(string plm360Org)

Syntax

PLM360Login(<plm360Org>)

Required Parameters

Description

Logs in to Fusion Lifecycle and returns the session ID.

Note

The session ID will be saved internally for later reuse in global variables.

PLM360Logout

Declaration

void PLM360Logout(string plm360Org)

Syntax

PLM360Logout(<plm360Org>)

Required Parameters

Description

Logs out of Fusion Lifecycle with the internally saved session ID.

Warning

This function may not log out of all session IDs when operating with multiple threads executing.