+ Start a Discussion
Dee Dee AaronDee Dee Aaron 

Help to setup a Trigger

Hi. I am hoping to use a trigger like the one in this thread, but I don’t know how to create this trigger.
https://developer.salesforce.com/forums/?id=906F0000000D8WtIAK
I have a custom object called “Sales Engineering Request” and there’s a chatter feed on this object.
I have a custom “status” field with a picklist and I want the value to be updated based on the last Feed Comment that was made.



Criteria:
If status is in “Pending Review" or "Awaiting Reply from Net Planning" or "Awaiting Reply from Sales”, then update based on the last commenter.
If the last person who commented is part of the Net Planning Department (User Profile ID: 00e3t000001PTFmFFO), update the status to: “Awaiting Reply from Sales”
If the last person who commented is NOT part of the Net Planning Department (Does NOT have User Profile ID: 00e3t000001PTFmFFO), update the status to: “Awaiting Reply from Net Planning”

Any help is appreciated. Thank you so much!
Best Answer chosen by Dee Dee Aaron
ANUTEJANUTEJ (Salesforce Developers) 
Hi Dee,

>> https://help.salesforce.com/articleView?id=bi_edd_wb_trigger_native.htm&type=5

This link has a step to step description of how to create a trigger you can follow.

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

Thanks.