I am working on a controller that takes an sObject record and finds the values of a list of field names on an Asset:
for (var fid in fsNamesList) {
var fieldname = fid;
var fieldvalue = sobjectrecord[fid];
}
This works well with fid = 'Name', but it falls apart when the field refers to a parent object, such as (Asset).Contact.LastName.
I tested with explicit references, and Asset[Name] works, while Asset[Contact.LastName] does not.
Does anyone have a workaround?