How to get the role of Contact Owner
Summary:
Get the role of Contact Owner
Content (please ensure you mask any confidential information):
Hi,
I am trying to get the role of the Contact Owner. As Contact is a standard object and Owner Role field is not available, I am using the Groovy script below:
def vo = newView('Resource');
def vc = newViewCriteria(vo);
def vcr = vc.createRow();
// Set criteria for PartyName
//def vci1 = vcr.ensureCriteriaItem('PartyName');
//vci1.setOperator('=');
//vci1.setValue(OwnerPartyName);
def vci1 = vcr.ensureCriteriaItem('PartyId')
vci1.setOperator('=')
vci1.setValue(OwnerPartyId)
println("Searching for PartyId: " + OwnerPartyId);
println("Criteria set for PartyId: " + vci1.getValue());
// Execute the query