Global API
...
Custom Object
Create Custom Object with chil...
Creation of Child Custom Object Record
1min
the following is an example of creating a child custom object record where we are setting every possible field (see https //app archbee io/docs/ lihuunv 7xnqrtzhskkc/hnjmkn99qxwdeafyyifsq https //app archbee io/docs/ lihuunv 7xnqrtzhskkc/emqjiknclze b zi9pinn custom object docid\ fgpsbggfpzat8wqldcqu1 for the available fields) the response will return the exact request data plus the new netsuite child custom object id (internalid) and the newly created salesforce child custom object id (salesforceid) here, the internal id of the parent custom object record has to be passed in only then will this record be treated as a child custom object record request // create a map to store all the data of a custom object 	map\<string, object> nscustomobject = new map\<string, object>(); nscustomobject put('name', 'other object record'); 	nscustomobject put('isinactive', false); // initializing the custom object custom fields list\<object> customobjectcustomfieldlist = new list\<object>(); map\<string,object> parentobjectlookupfield= new map\<string,object>(); parentobjectlookupfield put('fieldtype', 'string'); parentobjectlookupfield put('scriptid', 'custrecord239'); parentobjectlookupfield put('value', '2626'); customobjectcustomfieldlist add(parentobjectlookupfield); map\<string,object> customobjectcustomfield1 = new map\<string,object>(); customobjectcustomfield1 put('fieldtype', 'string'); customobjectcustomfield1 put('scriptid', 'cusrecord240'); customobjectcustomfield1 put('value', 'hello world'); customobjectcustomfieldlist add(customobjectcustomfield1); map\<string,object> customobjectcustomfield2 = new map\<string,object>(); customobjectcustomfield2 put('fieldtype', 'string'); customobjectcustomfield2 put('scriptid', 'custrecord241'); customobjectcustomfield2 put('value', '9'); customobjectcustomfieldlist add(customobjectcustomfield2); // 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', '196'); string reqjson = json serialize(requestjsonmap); map\<string, object> reqobj = new map\<string, object>(); reqobj put('version', '1 0'); reqobj put('action', 'createcustomobjectrecord'); 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=createcustomobjectrecord, timestamp=1691673464883, validrequest=true, version=1 0, responsejson={ "errors" \[], "status" "200", "customobjectrecords" \[ { "salesforceid" "a0f1e000001rkmeaae", "rectype" { "name" "order child", "internalid" "196" }, "owner" { "name" "praveena u", "internalid" "4" }, "name" "other object record", "lastmodified" 1691673463, "isinactive" false, "internalid" "608", "customfieldlist" { "customfield" \[ { "valuelookup" { "name" "parent object record", "internalid" "2626" }, "value array" null, "value" null, "scriptid" "custrecord239", "label" null, "isparent" null, "ismandatory" null, "isformula" null, "internalid" "860", "fieldtype" null, "displaytype" null, "description" null, "defaultvalue" null, "defaultchecked" null, "accesslevel" null }, { "valuelookup" null, "value array" null, "value" "false", "scriptid" "custrecord243", "label" null, "isparent" null, "ismandatory" null, "isformula" null, "internalid" "864", "fieldtype" null, "displaytype" null, "description" null, "defaultvalue" null, "defaultchecked" null, "accesslevel" null }, { "valuelookup" null, "value array" null, "value" "9", "scriptid" "custrecord241", "label" null, "isparent" null, "ismandatory" null, "isformula" null, "internalid" "862", "fieldtype" null, "displaytype" null, "description" null, "defaultvalue" null, "defaultchecked" null, "accesslevel" null } ] }, "created" 1691673463 } ] } }