Accessing fields from related records via custom lookup fields works like this: object.lookup_field__r.Name
This piece of code would return the Name
of the related record via custom lookup field lookup_field__c
.
I can see that What
and Who
on Task
object are somehow different.
Is it possible to access a field via What
or Who
lookups in the same or similar manner like I mentioned above?
I used to access fields by querying related records by WhatId
and WhoId
but it gets quite complicated, I am searching for clean and short approach to solve this problem.