+ Start a Discussion
DeptonDepton 

convert custom link/button JavaScript to VF

Hi,

 

I have the following custom link that automatically sends and email to the AccDev Manager.

 

location.replace('/email/author/emailauthor.jsp?retURL=/{!AccDev__c.Id}&p3_lkid={!AccDev__c.Id}&rtype=003&p2_lkid={!AccDev__c.DevManagerId__c}&template_id=00X30000001VixC&p5=&save=1');

 I would like to replace this custom link/detail page button for a custom forrmula field or a VF component so users avoid to go to each record and click on the button and they can do it from a list view but individually

 

So I am thinking to replace it for a VF component in the page (if it is possible to add this component in the list view) so if the user click on Attend for a specific AccDevt will refresh the page and the email will be sent to the DevManager and it will be recorder in the activity related list of the AccDev

 

 

Thank you!

Best Answer chosen by Admin (Salesforce Developers) 
DeptonDepton

Solved!

 

HYPERLINK('javascript:;'&"location.replace('/email/author/emailauthor.jsp?retURL=/"& Id &"&p3_lkid="& Id &"&rtype=003&p2_lkid="& DevManager__r.Id 
&"&template_id=00X30000001VixC&p5=&save=1');",'Click Here','_self')