Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to set environmental variables and call it from adaptive form?

Avatar

Avatar
Validate 1
Level 1
mohamedn4455443
Level 1

Likes

0 likes

Total Posts

46 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 1
Give Back 3
Give Back
Affirm 1
View profile

Avatar
Validate 1
Level 1
mohamedn4455443
Level 1

Likes

0 likes

Total Posts

46 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 1
Give Back 3
Give Back
Affirm 1
View profile
mohamedn4455443
Level 1

25-08-2020

How to set environmental variables?

Such as webservice url variable in development and production.

View Entire Topic

Avatar

Avatar
Boost 250
MVP
Nikhil-Kumar
MVP

Likes

250 likes

Total Posts

262 posts

Correct Reply

38 solutions
Top badges earned
Boost 250
Validate 1
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Boost 250
MVP
Nikhil-Kumar
MVP

Likes

250 likes

Total Posts

262 posts

Correct Reply

38 solutions
Top badges earned
Boost 250
Validate 1
Ignite 3
Ignite 1
Give Back 5
View profile
Nikhil-Kumar
MVP

25-08-2020

@mohamedn4455443 
As mentioned by @Andrei_Dantsou , setup the OSGI configuration and use the following code in case of getting runmodes in model or component class:

   @Reference
   private static SlingSettingsService slingSettingsService;


slingSettingsService.getRunModes().contains("prod")    ---> For production
slingSettingsService.getRunModes().contains("dev")     ----> for development



Thanks,
Nikhil