You need to sign in to do that
Don't have an account?
Cris9931
why i have NULL as result here?
I have the following:
I tried to make a formula field with this: SVMXC__Technician__r.SVMXC__Service_Group__r.Name and it's working... I don't know why in my trigger it's not working...
P.S. my trigger is after update, after insert, before update
for(SVMXC__SVMX_Event__c svmxEv : Trigger.New) { System.debug('#############' + svmxEv.SVMXC__Technician__r.SVMXC__Service_Group__r.Name); }
I tried to make a formula field with this: SVMXC__Technician__r.SVMXC__Service_Group__r.Name and it's working... I don't know why in my trigger it's not working...
P.S. my trigger is after update, after insert, before update
Hi Christian,
The formula will work alright but in Trigger.New, you can only access fields on the object and ID's of the related records.
In your trigger.new, svmxEv.SVMXC__Technician__r.SVMXC__Service_Group__r.Name is available but you need to capture this ID in a collection and then query for other fields.