You need to sign in to do that
Don't have an account?
roni 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
);
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
);
if so you need to query and need to do it