Tech Support > Microsoft Windows > Windows CRM > Distinguish between dev and prod in Javascript
Distinguish between dev and prod in Javascript
Posted by m1sterd on January 15th, 2008


Hi,

In the onload event of the case entity, I want to call the crm service. For
this, I make a small call to an aspx page which makes the web service call.

The problem is that since I do not know if the code is running in the
development or in the production environment, I have to change the code
before exporting the customization, given the name of the server is hard
coded. This is hardly acceptable and might cause problems..

Is there a way to know on which environment the javascript is running?

Things like document.domain always give localhost, which is no help.
Finding the ip address requires ssi, which are not allowed in crm to my
knowledge.

Any help would be appreciated,

Thanks

Posted by Robert MacLean on January 15th, 2008


What differences are you trying to accommodate for between dev/prod that
using things like document.domain doesn't suffice?
--
Robert MacLean
http://www.sadev.co.za


"m1sterd" wrote:

Posted by m1sterd on January 15th, 2008


Well, as i said, document.domain doesn't indicate any difference since it
gives localhost whatever environment is used. And I want to know if im on dev
or prod.

"Robert MacLean" wrote:


Similar Posts