Retrieve Host and Organization name dynamically in MS CRM through JavaScript

While we are writing any OData query in MS CRM, we have to retrieve the host and orgnization urls dynamically so that when ever code moves to staging or production, code will works withoug any modifications.

To retrieve host :

var host = location.host;

Organization Name:

var org= Xrm.Page.context.getOrgUniqueName();

No comments:

Post a Comment

Featured Post

Improving MS CRM Performance

Performance on MS CRM is always a crucial thing and we may follow different ways to achieve the performance thing. Below is the one more a...