function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nara2012Nara2012 

updating parent field using workflows

Hi I am trying to understand the difference between workflows and process builder.
When it comes to updating fields, can you update a parent record using workflow? For ex: when the workflow is written on Contacts can you update a field on the Account object? How is it done? 
 
Best Answer chosen by Nara2012
nagendra 6989nagendra 6989
Hi Nara,

By following the below steps you can achieve how to update parent field using workflows.
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.

Thanks.

Mark this as solution if it helps you.....................
 

All Answers

nagendra 6989nagendra 6989
Hi Nara,

By following the below steps you can achieve how to update parent field using workflows.
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.

Thanks.

Mark this as solution if it helps you.....................
 
This was selected as the best answer
Nara2012Nara2012
Thanks nagendra. I tried the wfr on Opportunity object and able to select the fields for Accounts on the field update.
But why is it not the same way when the workflow rule is written on the Contacts object? Contacts too has a lookup relationship to Accounts. But it doesn't allow to update Account fields from Contacts.
practice salesforcepractice salesforce
This is because A master-detail relationship is required in Workflows. In the case of Account and contact, its a lookup relationship.So you are unable to find the Account fields on Contact object