I have been using the Xrm.Page.getAttribute method to access fields in the current entity. I would like to drill down and access fields from associated entities. Entity associations have been made using "lookup" type fields. I have gone as far as finding
the GUID of the associated entity. What's next?
You can pull the data from another entity using the OData service.
Here is an example of pulling the ParentCustomerID of a record based on the customer id.
var idCustomer =Xrm.Page.getAttribute("customerid").getValue().id; var retrieveRecordsReq = new XMLHttpRequest();
var ODataPath = Xrm.Page.context.getServerUrl() + "/XRMServices/2011/OrganizationData.svc";