Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

SlingModel to get cloudconfig

Avatar

Level 5

Hi Team,

I am using below code to get cloudconfig but configurationmanager is null here..any help ?

cloudConfig = pageProperties.getInherited("cq:cloudserviceconfigs", new String[0]);

    final Configuration configuration = configurationManager.getConfiguration("salesforce-demo", cloudConfig);

    log.info("configuration Cloud"+configuration);

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hi,

Thanks for your reply !

I have resolved the issue with below code

ConfigurationManager cfMgr = resourcePage.getContentResource().getResourceResolver().adaptTo(ConfigurationManager.class);

View solution in original post

2 Replies

Avatar

Correct answer by
Level 5

Hi,

Thanks for your reply !

I have resolved the issue with below code

ConfigurationManager cfMgr = resourcePage.getContentResource().getResourceResolver().adaptTo(ConfigurationManager.class);