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
MayankDkPantMayankDkPant 

Field Update Based on WorkFlow

Hi,

 

I have two Objects A and B. A is master and B is child.

My scenario : When ever new record is created in B or whenever existing record is updated in B then, value in object A should also get updated based on most recent value of B.

 

Ex: If value added to B is 6 then it should be reflected in A as 6.

I have done this using trigger but I want it through workflow. Is there any option for doing this. Any help will be appreciated.

 

With Regards,

Mayank Pant

Best Answer chosen by Admin (Salesforce Developers) 
liron169liron169
when you use the fields from Object B in the workflow, they already contain the most recent value, so all you need to do is to assign the value to the field in Object A.

All Answers

Prady01Prady01

Sorry for the wrong Info! and thanks

liron169liron169
You can do it in workflow.

in workflow you can update up -- from the child update the its parent.
you can't update in workflow the other direction -from the parent update the child
MayankDkPantMayankDkPant

Thanks but can you tell me how really to achieve this. I have created a workflow which triggers whenever users edit or created a value for Object B.  I have added field updated action for workflow and have added field on master object A which need to be updated.

Problem is how will I select the most recent value from Object B to be assigned to A field.?

 

Any help will be appreciated.

 

Thanks once again.

 

With Regards,

Mayank Pant.

 

liron169liron169
when you use the fields from Object B in the workflow, they already contain the most recent value, so all you need to do is to assign the value to the field in Object A.
This was selected as the best answer
MayankDkPantMayankDkPant

Thanks it is working.

 

Can we have workflows for delete event.

liron169liron169
"Can we have workflows for delete event."

No
liron169liron169

For delete you must write trigger.