+ Start a Discussion

How to populate the date/time from a parent object into a child date/time field

Hi I have two custom objects they have a master detail relationship between them.


One is called SBS_Event__c the child object Event_session__c.


The SBS_Event Object has a date time start date and start date finish date.


I also want to add a date time start and finish fields to Event_session__c custom child object.


I want the date/time Start date to be populated with the SBS_Event__c start date time by default and likewise for the Finish date.


I have tried both creating a custom fomula field that takes the date/time from the SBS_Event object and then sets it as the default value for the date/time field in Event_session__c. But the value never appeares to be populated.


I have also tried creating a workflow that checks if the date time field is saved as NULL and then runs a fomula that should populate this field from date Time from SBS_Event__c into the date time field in  Event_session__c.


But in my tests this field never gets populated. Please help advise.


Hi Well I have managed to get the workflow working. The issue was because i was doing the following (FieldName__c == Null) instead of IsNull(FieldName__c).


However it is not the ideal solution it would be better to poulate with the values from Parent on the Edit screen not after I have saved the record.

You can populate it by passing the values via a New button override on the related list. This would only work if they would always create the record from the parent record screen.