8,849
edits
Changes
no edit summary
This function is used to find a Level 1 {{l1}} contact.
levelonecontact_find(flag,callback,appid,opportunityid,fields,filter,order,start,end)
|'''Fields''' ||The field list to be retrieved.
|-
|'''[[Pandora FilterExamples|Filter]]'''|| The criteria to apply on the return records.
|-
|'''Order'''|| The field to be ordered by for the return records.
Prefix=??
==Notes==
Standard field names on the intersection table:- * '''roleid''': The roleid of the user role ([[roleid]]) with which that the contact is assigned to the Level 1 record is stored in with* '''contactid''': the contact userid.* '''opportunityid''': the opportunity ID.* '''oprid''' field: the intersection ID of the contact/Level 1 intersection
==Examples==
* Find the contacts assigned to the current Level 1 {{l1}} with [[roleid]] 12345:
var drs=levelonecontact_find(false,"",appid,@opportunityid@,"contactid","opr.roleid=12345","",0,100);
* Find the role the current user is assigned with on a given Level 1 record, and the intersection ID :* You need the intersection ID if you want to update Custom Fields on the intersection, or trigger a UTA Role Assignment Workflow.
var fields="oprid";
var filter="opr.contactid=@me.userid@";
var rs=levelonecontact_find(false,"",12345appid,opportunityid,fields,filter,"",0,1);
var assignedRoleID=rs.getfieldbyname(1,'oprid');
var intersectionID=grs.getfieldbyname(1,'oprid')
==See Also==
* [[Pandora Filter Examples]]
[[Category: Pandora]]