709 bytes added,
10:01, 4 September 2013 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':
<pre>
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");
}
</pre>
==See Also==
* [[Pandora Filter Examples]]
[[Category:Pandora]]