Global API
...
Custom Object
Create Custom Object with chil...

Creation of Parent Custom Object Record

1min
the following is an example of creating a parent 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 custom object record id (internalid) and the newly created salesforce custom object record id (salesforceid) request // create a map to store all the data of a custom object &#x9;map\<string, object> nscustomobject = new map\<string, object>(); nscustomobject put('name', 'parent object record'); &#x9;nscustomobject put('isinactive', false); // initializing the custom object custom fields list\<object> customobjectcustomfieldlist = new list\<object>(); map\<string,object> customobjectcustomfield1 = new map\<string,object>(); customobjectcustomfield1 put('fieldtype', 'string'); customobjectcustomfield1 put('scriptid', 'custrecordphone'); customobjectcustomfield1 put('value', '9809876567'); customobjectcustomfieldlist add(customobjectcustomfield1); map\<string,object> customobjectcustomfield2 = new map\<string,object>(); customobjectcustomfield2 put('fieldtype', 'double'); customobjectcustomfield2 put('scriptid', 'custrecord6'); customobjectcustomfield2 put('value', 90 0); 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', '17'); 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=1691672869384, validrequest=true, version=1 0, responsejson={ "errors" \[], "status" "200" "customobjectrecords" \[ { "salesforceid" "a071e000003tzriaam", "rectype" { "name" "prestructured", "internalid" "17" }, "owner" { "name" "praveena u", "internalid" "4" }, "name" "parent object record", "lastmodified" null, "isinactive" false, "internalid" "2626", "customfieldlist" { "customfield" \[ { "valuelookup" null, "value array" null, "value" "false", "scriptid" "custrecord3", "label" null, "isparent" null, "ismandatory" null, "isformula" null, "internalid" "212", "fieldtype" null, "displaytype" null, "description" null, "defaultvalue" null, "defaultchecked" null, "accesslevel" null }, { "valuelookup" null, "value array" null, "value" "9809876567", "scriptid" "custrecordphone", "label" null, "isparent" null, "ismandatory" null, "isformula" null, "internalid" "215", "fieldtype" null, "displaytype" null, "description" null, "defaultvalue" null, "defaultchecked" null, "accesslevel" null }, { "valuelookup" null, "value array" null, "value" "90 0", "scriptid" "custrecord6", "label" null, "isparent" null, "ismandatory" null, "isformula" null, "internalid" "217", "fieldtype" null, "displaytype" null, "description" null, "defaultvalue" null, "defaultchecked" null, "accesslevel" null } ] }, "created" null } ] }