You need to sign in to do that
Don't have an account?
satyam
How to give access control to custom button
Hi,
I created a custom button and i want that button should work for queue member only if anyone else is clicking that button then it should show alert message that you are not the member of queue.
How i can implement this in custom button creation using javascript or anything else.
Thanks in Advance.
Thanks:))))
write a if condition to check weather the person clicking the button is a member or not
Hi Satyam,
Make the custom button as execute java script. And in the button use AJAX to query the queue where Memberid = logged in user id. If it is found alow the user else, give the alert message.
Thanks,
Phoenixed.
Hi,
I have written below code for this
Queueid=[Select Id from Group where type='Queue' and Name='Reg_Service_Queue'];
Selecteduser=[Select UserOrGroupId From GroupMember where GroupId =:Queueid];
if(Selecteduser == UserInfo.getUserId())
{
alert('Yes');
}
else
{
alert('No');
}
but its showing an error that
A problem with the OnClick JavaScript for this button or link was encountered:
missing ] after element list
what is the solution of this problem.
Thanks:))))
can u post ur javascript code