Pandora - Sample - Find Company

The following script can be used to find companies in the system using Pandora's function company_find (Pandora - Locate an Organisation).

Let's find companies where parent company id is '123' and return 'company name' and 'company id':

ss_developer_key = "...your dev key here...";
var parent_company_id = "123";
var filter = "parentcompanyid=" + parent_company_id;
var fields = "companyid,name";
var sort = "name asc";
var rs = company_find(false, "", fields, filter, sort, 0, 200);

if (rs.recordcount > 0) {
	alert("There are " + rs.recordcount + " companies found.");
} else {
	alert("No companies were found");
}

See Also