I need to add some URL parameters in the Send Email button in Email related list in Case detail page.
I have added a custom detail page button with execute javascript. Below is the button code.
var loc;
var uRoleId = UserInfo.getUserRoleId();
if(
"{uRoleId}" == "General Permissions Team"){
loc = "/ui/core/email/author/EmailAuthor?p2_lkid=0031500001e729m&rtype=003&p3_lkid=5001500000TkUwp&retURL=%2F5001500000TkUwp&p26=xyz@gmail.com";
}
else{
loc = "/ui/core/email/author/EmailAuthor?p2_lkid=0031500001e729m&rtype=003&p3_lkid=5001500000TkUwp&retURL=%2F5001500000TkUwp&p26=test@gmail.com";
}
window.top.location.href = loc;
Now when I click on the button , I get a javascript error that user info is not defined. Can you help me point out whats the issue with the button code.