Tuesday, March 26, 2019

SUITESCRIPT ERROR: SSS_RECORD_TYPE_MISMATCH

 

Description: A SuiteScript error thrown when the record loaded has a different type: {1} from the type specified: {2}.

Cause: Record loaded by API does not match the type of internal

 

Example:

Internal IDNameItem Type
10710% Discountdiscountitem
116Iron Skilletinventoryitem

var record = nlapiLoadRecord('inventoryitem', 107);

Internal ID 107 is a 'discountitem' type but Load Record API calls for 'inventoryitem'

Fix: check the type from the record. In the example, the API loads an inventory item therefore the ID to be used should be 116.

To view a listing of the available SuiteScript Supported Records in the help guide, go to:

SuiteCloud (Customization, Scripting, and Web Services) : SuiteScript : SuiteScript Reference : SuiteScript Supported Records

 

 

No comments:

Post a Comment