You need to sign in to do that
Don't have an account?
ForceLover
GroupMember issue
Hi Everyone,
I have 3 queues in my dev.org i want to find the present login user is member of which queue.how i can find this.Thanks in advance
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Hi Everyone,
I have 3 queues in my dev.org i want to find the present login user is member of which queue.how i can find this.Thanks in advance
yes i tried something like this,but i don't want to give the queue name in the query it should check all the queues.I think there is no such field usereid in the Groupmember object
ConvertLeadsController Compile Error: No such column 'UserId' on entity 'GroupMember'.
ID uid = userinfo.getuserid();
List<Group> g = [select id, Name from Group where Type = 'Queue'];
System.debug('@@@@@'+g.size());---------output is 3
List<GroupMember> gm = [Select Id, GroupId, UserOrGroupId From GroupMember where UserOrGroupId =:uid];
system.debug(gm);----------output is 0
but my present login user is member for 2 queues
It doesn't seem possible at the moment actually, if you add members to groups by role instead of by group. If anyone else knows how to do this, input would be appreciated.
1) Query Group.Id for RelatedId = :UserInfo.getUserRoleId()
2) Query GroupMember.GroupId for UserOrGroupMember IN (results from #1)
3) Query Group.Name for Id IN (results from 2).
System.debug('@@@@@'+g.size());
It is giving the list size is zero.
Actually i want to restrict my users to convert their own leads along with queue leads in which they are a member.I override my standard convert button with a VF which will perform lead convertion.I want to put these conditions in the controller
1) Sales Rep can convert their own leads, and Lead owned by a Queue they are a member of
2) If Sales Rep converts a lead owned by a Queue , then change ownership Contact, Account, Opportunity to Sales Rep user who is converting.
3) Sales Manager and Executive can convert their teams' leads. If a Sales Manager or Executive converts a sales user's Lead, ownership of lead, opportunity, account and contact should remain sales rep