You need to sign in to do that
Don't have an account?
SK Nallacheruvu
How do I create a custom button on task/activities that dynamically determine the record id of the object it is on
Hi,
Is there a way to create a custom email button something in lines of below but this button can be on account, opportunity or lead. Is there a way to dynamically fetch the id of the record where the button is. For example if the below button is on Lead then the URL parameter should determine p3_lkid={!Lead.Id}, p4={!Lead.OwnerEmail}, etc. And also can it pass it over to the email template.
'/email/author/emailauthor.jsp?p2_lkid={!Contact.Id}&p4={!Opportunity.OwnerEmail}&rtype=003&p3_lkid={!Opportunity.Id}&template_id=00X30000000eCGt&retURL=/{!Opportunity.Id}'
Thank You
Is there a way to create a custom email button something in lines of below but this button can be on account, opportunity or lead. Is there a way to dynamically fetch the id of the record where the button is. For example if the below button is on Lead then the URL parameter should determine p3_lkid={!Lead.Id}, p4={!Lead.OwnerEmail}, etc. And also can it pass it over to the email template.
'/email/author/emailauthor.jsp?p2_lkid={!Contact.Id}&p4={!Opportunity.OwnerEmail}&rtype=003&p3_lkid={!Opportunity.Id}&template_id=00X30000000eCGt&retURL=/{!Opportunity.Id}'
Thank You
For ex -
JavaScript Code
Let me know if this helps.
Thank u for the help mustafa. I dont see a way to use this javascript inside the email template. I am looking to get id dynamically in the template. For example say I have to use one common template for two different objects and its records say account(John Aaron) and lead(Stefen King) and in my template I want the name of the record where this email template is used. So here in my example if I use this template in an account I wanted it to display 'John Aaron' and if it is a lead want to display 'Stefen King'. How would I do that?