You need to sign in to do that
Don't have an account?
Lauren Stupar
Do I need to use an Apex Trigger to update a case field when record in custom object is created?
I'm not familiar with Apex Triggers but I think I have a use case that requires one. Our org has a cutom object called Surveys. When a new Survey record is created, I want to update a field on an existing Case. I tried using a Workflow Rule, but the Case fields were not available in the Workflow Action 'New field update'. I'm guessing it's not the right kind of relationship. We're using Classic interface and in the process of migrating to Lightning.
The Survey has a field called Date Survey Completed. I want it to update a date field called QI Date, on a related Case. Surveys and Cases have a lookup relationship.
Before I take the time to learn about and attempt to write an Apex Trigger, I wanted to ask: Does this sound like a situation that calls for a trigger or is there a simpler process to address this? and, if so, does anyone have an example of a similar code I could use as a starting point?
Any thoughts would be appreciated.
The Survey has a field called Date Survey Completed. I want it to update a date field called QI Date, on a related Case. Surveys and Cases have a lookup relationship.
Before I take the time to learn about and attempt to write an Apex Trigger, I wanted to ask: Does this sound like a situation that calls for a trigger or is there a simpler process to address this? and, if so, does anyone have an example of a similar code I could use as a starting point?
Any thoughts would be appreciated.
Please find the code
If you find it's helpful then please mark it as best answer.It would be helpful to others.
Thanks&Regards
Brahmanaidu
https://sfdcscenarios.blogspot.com/
It can be achieved through Process builder as well.
https://trailhead.salesforce.com/en/content/learn/modules/business_process_automation/process_builder
https://help.salesforce.com/articleView?id=process_overview.htm&type=5