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 ID | Name | Item Type |
---|---|---|
107 | 10% Discount | discountitem |
116 | Iron Skillet | inventoryitem |
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