You need to sign in to do that
Don't have an account?
Shannon Andreas 1
Trigger help - changing picklist value of one object based on picklist value change on another object
Hello,
I am trying to figure out if I need a trigger to update a field on the Account object when a field on the Contract object changes.
For example,
When Contract field, Status = "Activated", change Account field, Type to "Customer"
There is a relationship beteen the account and contract objects.
Thanks!
Shannon
There would be one use case. If on insert of on Contract record having status='Activated' then corresponding Account will have type = 'Customer'. If we insert another contract record corresponding to the same account then what should be the type on Account?
Hi, to answer your question,, yes a trigger would be required as you are updating the field of Account object when Contract object is being updated.
Yes you could write a trigger but trigger is not the only option. Take a look at the process builder also for this.
It is similar to a workflow with additional features. Using process builder you can "Update any related record—not just the record or its parent".
https://help.salesforce.com/HTViewHelpDoc?id=process_overview.htm
Advantage of using a process builder over a trigger
1 .No code
2. No code coverage :)
Thanks,
Vishal