Difference between revisions of "Pandora - Remove a UTA Role (Company or Contact) and Associate Feature"
From SmartWiki
Line 38: | Line 38: | ||
RoleID = Role | RoleID = Role | ||
+ | ===Example - Remove Contact from Level 1=== | ||
+ | function removeContact(userid,roleid){ | ||
+ | var r=confirm("Are you sure you want to remove this contact from your application?"); | ||
+ | if (r==true){ | ||
+ | ss_developer_key="@system.ss_developer_key@"; | ||
+ | utarole_remove(false ,"","23","@opportunityid@","40",userid,roleid); | ||
+ | alert("Contact has been removed."); | ||
+ | $("#savedraftbutton").click() | ||
+ | } | ||
+ | else | ||
+ | return false; | ||
+ | } | ||
+ | |||
+ | Put following in a read only that displays the contacts on Level 1 | ||
+ | |||
+ | [#(?object=contact;criteria=(rolename in ("Research Body - Finance Officer","Research Body - Research Officer"))) | ||
+ | <input type="button" class="ButtonSm" value="Remove" onclick="removeContact(~userid~,~roleid~)">#] | ||
===Consumer/Provider=== | ===Consumer/Provider=== |
Revision as of 17:23, 3 April 2013
This function is used to remove a single organisation or contact with a UTA level 1, 2, or 3 record. This function is also used to disassociate a contact with an organisation record through the Associate/Association feature or to remove Consumer/Provider relationships
utarole_remove(flag,callbackfunc,parenttype,parentobject,childtype,childoject,roleid)
Parameter | Description |
---|---|
Flag | Asynchronous processing Flag
Set to False for synchronous processing. Set to True for asynchronous processing. |
Callbackfunc | User created JavaScript function to manage the callback from an asynchronous function. |
parenttype | Type of object to attach a child object (use 23 for Level 1, 26 for Level 2, 30 for company association) |
parentobject | The ID of the parent object |
childtype | Type of child object to be attached to the parent object (30: company, 40: user) |
childobject | The ID of the child object |
Returns |
Notes
Associate a company or a contact with a Level 1
Parent type could be level 1, 2 or 3 or company (for the associate)
Parentobject = ID of Level 1, 2 or 3 or company ID
Only company ID or User ID
RoleID = Role
Example - Remove Contact from Level 1
function removeContact(userid,roleid){ var r=confirm("Are you sure you want to remove this contact from your application?"); if (r==true){ ss_developer_key="@system.ss_developer_key@"; utarole_remove(false ,"","23","@opportunityid@","40",userid,roleid); alert("Contact has been removed."); $("#savedraftbutton").click() } else return false; }
Put following in a read only that displays the contacts on Level 1 [#(?object=contact;criteria=(rolename in ("Research Body - Finance Officer","Research Body - Research Officer"))) <input type="button" class="ButtonSm" value="Remove" onclick="removeContact(~userid~,~roleid~)">#]
Consumer/Provider
- To determine the ROLEID for Consumer/Provider relationships go to the UTA Connection Roles setting within the UTA, right-click or hover over the hyperlink for the relevant role. The ROLEID is the parameter listed as statusid in the URL.
Level 1 Provider to Level 1 Consumer:
utarole_remove(false,"",23,PROVIDER_OPPORTUNTYID,23,CONSUMER_OPPORTUNTYID,ROLEID);
Level 1 Provider to Level 2 Consumer:
utarole_remove(false,"",23,PROVIDER_OPPORTUNTYID,26,CONSUMER_EVENTID,ROLEID);
Level 2 Provider to Level 1 Consumer
utarole_remove(false,"",26,PROVIDER_EVENTID,23,CONSUMER_OPPORTUNTYID,ROLEID);