Global API
Requests
NetSuite Custom Fields
5min
you can find the below customfieldlist field name in all netsuite objects, use it to pass the custom fields list as a part of any create/update request field name date type description customfieldlist netsuite custom fields docid\ gccxmcxcsjyghql05kush custom fields and their values let's see how to add the custom fields in the request and what format the data is to be given customfields field name data type description customfield netsuite custom fields docid\ gccxmcxcsjyghql05kush \[] list of customfield info customfieldinfo field name data type description fieldtype string specify the data type of a custom field first, know what is the netsuite custom field type of the custom field, so we can see what fieldtype value is to be selected from the netsuite custom fields docid\ gccxmcxcsjyghql05kush internalid string internal id of the netsuite custom field scriptid string netsuite custom field api name value string the value of the custom field required and returned for all the custom fields other than “select” (fieldtype) valuelookup common data types docid\ lgkoy7mdxhvjzkl2nr9ql the internal id of the custom lookup/picklist field required and returned for the fieldtype “select” the values of netsuite custom field type (helps in knowing the fieldtype) and the netsuite custom field api name (scriptid) can be known either by logging into netsuite or going to the custom fields tab on the breadwinner for netsuite page in salesforce in case of standard netsuite objects custom field types netsuite field type fieldtype value value date date the date value is accepted and returned as a unix timestamp in seconds datetime date the date time value is accepted and returned as a unix timestamp in seconds list record (lookup) select internal id of the netsuite record or list element integer number long decimal number double currency double percent double check box boolean true/false free form text string text area string long text string email address string email format hyperlink string domains & websites below is an example of constructing the customer custom fields as a part of the request request part // create a map to store all the data of a customer map\<string, object> nscustomer = new map\<string, object>(); // initializing the customer custom fields list\<object> custcustomfieldlist = new list\<object>(); // 1 check box custom fields map\<string, object> custcustomfield1 = new map\<string, object>(); custcustomfield1 put('fieldtype', 'boolean'); custcustomfield1 put('scriptid', 'custentity naw trans need approval'); custcustomfield1 put('value', 'true'); custcustomfieldlist add(custcustomfield1); // 2 free form text, text area, long text, email address, and hyperlink custom fields map\<string, object> custcustomfield2 = new map\<string, object>(); custcustomfield2 put('fieldtype', 'string'); custcustomfield2 put('scriptid', 'custentity my brn'); custcustomfield2 put('value', 'u72200mh2009plc123456'); custcustomfieldlist add(custcustomfield2); // 3 date and datetime custom fields map\<string, object> custcustomfield3 = new map\<string, object>(); custcustomfield3 put('fieldtype', 'date'); custcustomfield3 put('scriptid', 'custentity document date'); custcustomfield3 put('value', '1628091060'); custcustomfieldlist add(custcustomfield3); // 4 integer number custom fields map\<string, object> custcustomfield4 = new map\<string, object>(); custcustomfield4 put('fieldtype', 'long'); custcustomfield4 put('scriptid', 'custentity stc daysuntilexpiry'); custcustomfield4 put('value', '7'); custcustomfieldlist add(custcustomfield4); // 5 decimal number, currency, percent custom fields map\<string, object> custcustomfield5 = new map\<string, object>(); custcustomfield5 put('fieldtype', 'double'); custcustomfield5 put('scriptid', 'custentity stc discountpercent'); custcustomfield5 put('value', '76 89'); custcustomfieldlist add(custcustomfield5); // 6 list record/lookup custom fields map\<string, object> custcustomfield6 = new map\<string, object>(); custcustomfield6 put('fieldtype', 'select'); custcustomfield6 put('scriptid', 'custentity rating'); custcustomfield6 put('valuelookup', new map\<string, object>{'internalid'=>'2'}); custcustomfieldlist add(custcustomfield6); // 7 custom segment fields map\<string, object> custcustomfield7 = new map\<string, object>(); custcustomfield7 put('fieldtype', 'select'); custcustomfield7 put('scriptid', 'cseg lead source'); custcustomfield7 put('valuelookup', new map\<string, object>{'internalid'=>'2'}); custcustomfieldlist add(custcustomfield7); // adding the customer custom fields nscustomer put('customfieldlist', new map\<string, object>{'customfield'=>custcustomfieldlist});