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
deepa_tansendeepa_tansen 

Need help to write cross object workflow or Trigger???

Hello,

 

If an opportunity = closed lost

 

"ABC" Field (Look up User) Account = Blank

 

please send an email to xyz@gmail.com and the "ABC"

Subject: Opportunity has been placed in Closed Lost 
Message: 

An opportunity on an account in (insert ABC)’s name has been placed in Closed Lost. Please follow up accordingly. 

Account name: (insert account name) 
Opportunity Link: (Insert: Opportunity link) 

 

Thanks,

D...

Karthikeyan JayabalKarthikeyan Jayabal

You can't have cross object merge fields in standard email templates.

 

Two workarounds:

1. EASY: Create a text formula field in Opportunity which fetches the related Account's User field name & use that in the standard email template

 

2. TOUGH: Visualforce template

deepa_tansendeepa_tansen

Hi,

 

Thanks for your reply... Have a question...

Can't we write a trigger and accomplish that task?

Avidev9Avidev9
I guess a Workflow with an email alert is more than enough. You dont need a trigger for this atleast.