How to get the role of Contact Owner — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to get the role of Contact Owner

in Sales 2 comments

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

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!