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
Satya Ranjan MohantySatya Ranjan Mohanty 

opportunity closed date

Hi All,
Here my situation is, in Opportunity object we are having a field closed date and in product level their is a field Date field 
my requriment is when we will change opportunity closed date field by 3 days then in product level date field should be added by 3 days.
for example: Opportunity closed date is 6/1/2017 i will change it to 6/3/2017 then in opportunity product if it is 5/31/2017 it should become 6/2/2017.
 we can achieve it by trigger but we need workflow because some other reqiurment are their based on this change in the UI
I need a help to write a workflow formula

Thanks in advance

Regards,
satya
 
a sangeetha 5a sangeetha 5
Hi Satya,

As far i understand Opportunity object is the parent and Opportunity Product is the child. One cannot create a cross object workflow filed update from parent to child, that is changes in parent field cannot make changes in child field, whereas vice versa is possible.
The only way to do is by using the Process Builder or Trigger.

For more details please refer to https://trailhead.salesforce.com/modules/business_process_automation/units/process_whichtool.
Make my answer in count if i answer your issue.

Thanks,
Sangeetha.

 
BALAJI CHBALAJI CH
Hi Satya,

What Sangeetha said is right., we cannot create a Cross-Objecte workflow update from Parent to Child. But there are workarounds to achive this. 

You can create a formula field in OpportunityLineItem which shows CloseDate of the parent Opportunity.
Then you can create a Workflow on OpportunityLineItem (Opportunity Product) with criteria when the formula field IsChanged.
You can store the the number of difference days in another field and using that, you can update the Date field in OpportunityLineItem .

Not sure about this approach., but you can give a try.

Best Regards,
BALAJI
Satya Ranjan MohantySatya Ranjan Mohanty
Hi balaji,

Thanks for your sujjection  can you tel me what should be the condition in process builder.

Regards,
satya