You can you a workflow (real-time or background) to pull the address data from the Account to fields on the Case. Another alternative if you only need to look at the data rather than use it in a report, view, etc... with Case is to embed a Quick View form
from the Account record into the Case form.
If you want to use JavaScript you can make a call to the REST endpoint and get the the data dynamically you could do something like this:
var customer = Xrm.Page.getAttribute("customerid").getValue();
if (customer === null)
return;
if (customer[0].entityType !== "account")
return;
var req = new XMLHttpRequest();
req.open('GET', encodeURI(Xrm.Page.context.getClientUrl() + "/XRMServices/2011/OrganizationData.svc/AccountSet(guid'" + customer[0].id + "')?$select=Address1_City,Address1_Line1"), true);
req.setRequestHeader('Accept', 'application/json');
req.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
req.onreadystatechange = function () {
if (this.readyState === 4) {
req.onreadystatechange = null;
if (this.status === 200) {
var result = JSON.parse(req.responseText).d;
Xrm.Page.getAttribute("new_city").setValue(result.Address1_City);
Xrm.Page.getAttribute("new_address1").setValue(result.Address1_Line1)
}
else {
alert(this.statusText);
}
}
};
req.send();
http://msdn.microsoft.com/en-us/library/gg334767.aspx
Jason Lattimer
My Blog - Follow me on Twitter - LinkedIn