Groovy Script to retrive roles
Hi all,
i want to retrive roles related to my account, i used this code:
def vo = newView('Resource');
def vc = vo.createViewCriteria()
def vcr = vc.createRow()
def vci1 = vcr.ensureCriteriaItem('PartyId')
vci1.setOperator('=')
vci1.setValue(adf.util.getUserPartyId())
vc.insertRow(vcr)
vo.appendViewCriteria(vc)
vo.executeQuery()
if(vo.hasNext())
{
def r = vo.next()
def x = r?.Roles.toString()
println(x);
}
The value of x is 'Channel Account Manager,Channel Sales Manager' but i have also other roles, why i can retrive only these roles??
Can you kindly help me?Thanks