+ Start a Discussion

Update the parent field value based on child field value using workflows?


can any one give the steps to approach this 
Update the parent field value based on child field value using workflows?
Don't think this would be possible using a Workflow as the fields available for updates are the object specific fields when using workflow field update.
However, you can use a trigger to accomplish this.

Create a trigger on the parent object and use SOQL to fetch the child record to be updating depending on the value of the field you wish to check as a condition.

Hi, you can update parent field based on the child field using workflows. This is known as Cross-Object field update using workflow rule.To do this the objects need to be in a master detail relationship.(this is mandatory)  At this minute this feature is applicatble to few standard objects which can have either a standard or custom detail objects. For more information refer to this article https://help.salesforce.com/HTViewHelpDoc?id=workflow_cross_object_field_updates.htm&language=en_US

Below are the steps on how you can accomplish this. Let us take Account and Opportunity objects as an example.

1. Create a workflow rule for Opportunity Object (Detail/Child object)
2. Set the evaluation criteria as required.
3. set the Rule Criteria as required.
4. Click next
5. Select field update from the 'Add workflow action' dropdown menu
6. Fill in the Name, Unique Name &  Description. If you notice 'Field to update' will appear as a dropdown with two possible values a) Opportunity b) Account (As account is a master object for Opportunity)
7. When you select Account object in the above dropdown, the second dropdown shows all the standard & custom fields from account object.
8. Select any field and set the formula to update that field.

This is how you can update the parent field from a workflow rule set on child object by setting the criteria on child object.

Hope this helps !!
Chetna AgrawalChetna Agrawal
Hi Ramu,
i am doing this with Account and contact.
my workflow is on contact, i am not able to see the account object in field updation.
Sébastien RichardSébastien Richard
Hi Chetna, you don't see Account object because this is a Lookup relationship between Contact and Account. A Master-Detail relationship is necessary to see parent object in picklist.