Global API
...
Requests
Custom Object
Update
1min
the following is an example of updating the custom object record, where we are changing some of the fields (see custom object docid\ fgpsbggfpzat8wqldcqu1 for all available fields) the netsuite custom object record id (internalid) is required to update the custom object record note you can only create one record at a time the response returns the complete custom object record information, but we have shortened the response in our example for ease of reading request // create a map to store all the data of a custom object map\<string, object> nscustomobject = new map\<string, object>(); nscustomobject put('internalid', '808'); nscustomobject put('name', 'custom record 2 update'); 	nscustomobject put('isinactive', true); // initializing the custom object custom fields list\<object> customobjectcustomfieldlist = new list\<object>(); map\<string,object> customobjectcustomfield = new map\<string,object>(); customobjectcustomfield put('fieldtype', 'string'); customobjectcustomfield put('scriptid', 'custrecord172'); customobjectcustomfield put('value', 'custom field value 1 update'); customobjectcustomfieldlist add(customobjectcustomfield); // adding the custom object custom fields nscustomobject put('customfieldlist', new map\<string,object>{'customfield'=>customobjectcustomfieldlist}); // initializing the requestjson data to be passed map\<string, object> requestjsonmap = new map\<string, object>(); requestjsonmap put('customobjectrecords', new list\<object>{nscustomobject}); requestjsonmap put('customobjectid', '11'); string reqjson = json serialize(requestjsonmap); map\<string, object> reqobj = new map\<string, object>(); reqobj put('version', '1 0'); reqobj put('action', 'updatecustomobjectrecord'); reqobj put('requestjson', reqjson); // placing a request to breadwinner global api map\<string, object> resp = breadwinner ns breadwinnernetsuiteapi call(reqobj); system debug(resp); response { action=updatecustomobjectrecord, timestamp=1648549432123, validrequest=true, version=1 0, responsejson={ "errors" \[], "status" "200",	 "customobjectrecords" \[ { "salesforceid" "a0z0l000006nnooeak", "rectype" { "name" "brand list", "internalid" "11" }, "owner" { "name" "navaneeth d", "internalid" "4" }, "name" "custom record 2", "lastmodified" 1648544292, "isinactive"\ false, "internalid" "808", "customfieldlist" { "customfield" \[ { "valuelookup"\ null, "value array"\ null, "value" "custom field value 1", "scriptid" "custrecord172", "label"\ null, "isparent"\ null, "ismandatory"\ null, "isformula"\ null, "internalid" "675", "fieldtype"\ null, "displaytype"\ null, "description"\ null, "defaultvalue"\ null, "defaultchecked"\ null, "accesslevel"\ null } ] }, "created" 1648544292 } ] } }