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()[0].id;
var retrieveRecordsReq = new XMLHttpRequest();
var ODataPath = Xrm.Page.context.getServerUrl() + "/XRMServices/2011/OrganizationData.svc";
retrieveRecordsReq.open('GET', ODataPath+"/ContactSet(guid'" + idCustomer + "')",false);
retrieveRecordsReq.setRequestHeader("Accept", "application/json");
retrieveRecordsReq.setRequestHeader("Content-Type", "application/json; charset=utf-8");
retrieveRecordsReq.send();
var records = this.parent.JSON.parse(retrieveRecordsReq.responseText).d;
alert(records.ParentCustomerId.Id);