Hi,
Looking for how to do this? I have a lookup field on one form... I want to get other data from the selected record in the lookup field to populate another field on the form.
I've found a million articles with the same stuff.. that shows how to get id, name, and type... but I want to get a different fields from those from the original record, in this case users entity.
This works to get id from new_user lookup field on form.
function GetUserDetails(executionContext) {
var formContext = executionContext.getFormContext();
var entityId = formContext.getAttribute("new_user").getValue()[0].id.slice(1,-1);
alert(entityId);
}
But can't use it to get fullname for example?
Doing this doesn't work:
formContext.getAttribute("new_user").getValue()[0].fullname;
Anyone help with missing piece?
Thanks,
Terry