I have a rule in the business object that manages the first part, so if a user makes a change, and the record has related records (Main_Planning_Data.SubAssembly=0 ), it sets the value that all the related records need to be to field Main_Planning_Data.SubAssemblyDate.
Code: Select all
If Main_Planning_Data.ProductionDate WAS CHANGED AND Main_Planning_Data.SubAssembly=0 Then
Main_Planning_Data.SubAssemblyDate=Main_Planning_Data.ProductionDate-2
PlanSubAssemblies
PlanSubAssemblies
Code: Select all
FIND Main_Planning_Data WHERE ThisMain_Planning_Data.SubAssemblyID=Main_Planning_Data.SALES_ORDER
IF SEARCH_COUNT > 0 Then Main_Planning_Data.ProductionDate = ThisMain_Planning_Data.SubAssemblyDate
Thanks.