+ Start a Discussion
Dee Dee AaronDee Dee Aaron 

Help to create a Trigger.

Hi. 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.

So...
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”

I believe I could create a trigger to do this, but I don’t know how? I found this article: https://developer.salesforce.com/forums/?id=906F0000000D8WtIAK

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

As mentioned in this link: https://developer.salesforce.com/forums/ForumsMain?id=9062I000000ITjY

You can follow the steps that are mentioned.

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.