Global API
...
Requests
Custom Object
Read
2min
to read custom object records, please use the below parameters supported “where” filters field name data type description created long this will filter on an exact match (equal) use the “additionalfilter” option for a range of dates name string to filter the records based on the specific name additonalfilter string construct the additional filter with a combination of the above fields using ‘+and+’ separator and pass it as a single string make sure to wrap the whole string using encodingutil urlencode example request map\<string, object> filters = new map\<string, object>(); filters put('additionalfilter', encodingutil urlencode('created>1619875961+and+created<1625146361', 'utf 8')); // encode additionalfilter after constructing it with +and+ for multi filters // field filters and additionalfilter for where param map\<string, object> filtermap = new map\<string, object>(); filtermap put('where', new map\<string, object>{'keyvaluemap'=>filters}); map\<string, object> requestjsonmap = new map\<string, object>(); requestjsonmap put('customobjectid', '17'); requestjsonmap put('customparameters', filtermap); string reqjson = json serialize(requestjsonmap); map\<string, object> reqobj = new map\<string, object>(); reqobj put('version', '1 0'); reqobj put('action', 'readcustomobjectrecord'); reqobj put('requestjson', reqjson); // place a request to breadwinner global api map\<string, object> resp = breadwinner ns breadwinnernetsuiteapi call(reqobj); system debug(resp); response { action=readcustomobjectrecord, responsejson={ "customobjectrecords" \[ { "salesforceid" null, "rectype" { "name" "prestructured", "internalid" "17" }, "owner" { "name" "praveena u", "internalid" "4" }, "name" "check new prestructured", "lastmodified" 1621323793, "isinactive" false, "internalid" "815", "customfieldlist" { "customfield" \[ { "valuelookup" null, "value array" null, "value" "true", "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" "navaneeth\@dhruvsoft com", "scriptid" "custrecord19", "label" null, "isparent" null, "ismandatory" null, "isformula" null, "internalid" "239", "fieldtype" null, "displaytype" null, "description" null, "defaultvalue" null, "defaultchecked" null, "accesslevel" null } ] }, "created" 1621323793 } ], "customparamters" { "where" { "value" null, "keyvaluemap" { "additionalfilter" "created%3e1619875961%2band%2bcreated%3c1625146361" } } }, "currentpagerecords" 1, "totalrecords" 1, "totalpages" 1, "searchid" "webservices 5333445 sb1 0413202320631375201300124324 2de9e11", "pageindex" 1, "errors" \[ ], "status" "200" }, timestamp=1681395350694, validrequest=true, version=1 0 }