You need to sign in to do that
Don't have an account?
Yuckle
$UserRole.PortalType
Where can I get a list of the possible values for $UserRole.PortalType?
or any other global variable/merge field for that matter.
Currently I'm trying to determine if a contact is a self service portal user.
The list of all the PortalType - which is a picklist in object UserRole,can be retrieved
by using the describe object, please check the enclosed code snippet:-
public List<SelectOption> getPortalType()
{
List<SelectOption> options = new List<SelectOption>();
Schema.DescribeFieldResult fieldResult =
User.PortalType.getDescribe();
List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
for( Schema.PicklistEntry f : ple)
{
options.add(new SelectOption(f.getLabel(), f.getValue()));
}
return options;
}
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.