You need to sign in to do that
Don't have an account?

to populate data in to Map<Id, List<Id>>
Hi,
Can some one give an example of how to populate data in to:
Map<Id,List<Id>>
Here Id is UserRoleId and List<Id> is the List of users who belong to that role id.
Thanks,
JBabu.
Think, it will look something like this:
All Answers
Think, it will look something like this:
Hi,
I have a question here.
As we all know, different roles will have different users. Suppose for the role 'A' we have 5 users. When code get executed then our map userRoleToUsers will be in the below format. (Id of the role -> ('Id of 1st user', 'Id of 2d user'....etc)).
Now what should I do if I want to make them owner of the record alternately? Like 1st - 2nd- 3rd - 4th - 5th then agin 1st?