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
roni shoreroni shore 

Updating child record

Hi Guys,
I am trying to populate a 2 level record (child) but somehow it is not updating. pls suggest
code
------
inTrans = new Service_Order_Line__c(
                         Service_Order__c = wo.Id,
                         Work_Detail_Auto_Created__c = true,
                         Expense_Type__c = 'TRAVEL',
                         Start_Latitude__c = wo.Group_Member__r.SVC_Latitude__c, // field not populating
                         Start_Longitude__c = wo.Group_Member__r.SVC__Longitude__c // field not populating

                     );
Raj VakatiRaj Vakati
Are you doing in before trigger ?? 

if so you need to query and need to do it