function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
amar joshiamar joshi 

custome button on opportunity detail page on Activity History section plz help

HI Experts ...

well i  want some specific on send an email button in opportunity

Requirement like this:

when user click Send An Email button from opportunity detail page then in the page that come after clicking in that page i want to get some fields value by default like

To: field is direct set to and
CC: field is directly set to the  users direct report person or manager of that user.

now this can be done with the costume button and pass URL as shown bellow 

/_ui/core/email/author/EmailAuthor?p2_lkid={!Account.Id}&p3_lkid={!Opportunity.Id}&retURL=%2F{!Opportunity.Id}p4=CC addresses &p5=BCC addresses &p24=Additional to addresses

where parameters are bellow
p3_lkid = ID of record in the associated to drop-down (Account, Opportunity, etc)
P4 = CC addresses
P5 = BCC addresses
p24= Additional to addresses

now the problem is from opportunity object i cant find the contact's email because my opportunity dont have any direct or indirect relation with contact  and one more point in opportunity page i can see the contact's email address because of contactRole's relationship with opportunity but when i m creating a costume button i cant see contactrole

and for CC only find the Manager's id not email (coz user is Global object  so i can find Manager id )

please if any have workaround let me know

Thanks & Regards