How to use different AppId on different Environments?
Application Type


I have different App Id for Different Environments.

Ex: On DEV I am using : 1234, and on Test  :  2345 and on production : 34567 

This App Id is maintained in Home.js under Scripts folder. I can't pass any input parameter to it. 

Can somebody help how do I use different AppId on different Environments?


Hi Khris,

Can you please let us know what is the use-case having different APPID  as a part of code in different environments?

You can alternatively store the APPID in site property rather than putting it in external JS file. Because js file is part of code package that will remain same to each environment.

But if you are using site-property, you can configure it later in each environment using service centre.

Hope it will help you about your usecase.


Hi Dileep,

As I mentioned my App ID is set in Home.js [only numbers] and this script is inside scripts folder where I can't pass any input parameter. 

So how do I use Site Properties value there.

Pls explain if any solution on this.


Hi Khris, 

as I mentioned if you have external JS file it will be part of your code, what logic u have mentioned in DEV, will be same in upper environment. I think this way it will be difficult to get the  appid specific to environment.

So Easy thing,  better to use site property have number app id there. So you can configure that later in each environment rather than putting in JS file.

But if still you want to achieve ,

You can try below steps.

In your case

  • In external JS file you should have three function for (Dev, Test, PROD), and all function is having return value AppID specific to that environment.
  • Now at runtime , you should detect the environment using We use GetServerName() from RichWidgets.
  • Now based on environment name,  call particular function from external JS (Home.JS) to get the AppID.

Hope it will give you idea.




Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.