function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kumar_ShahKumar_Shah 

How to access cusotm global variable in lightning

Hello,

I created a custom global variable and I want to store in Aura Component without making $A.enqueueAction each time. Is there a way to access it, the way we access standard global variables in lightning.

Thanks,
AbhishekAbhishek (Salesforce Developers) 
Kumar,

There is no direct way to access custom settings in lightning. The only way to access the custom setting is by using a server-side controller.

https://salesforce.stackexchange.com/questions/132177/how-to-access-a-hierarchy-custom-setting-from-lightning-component

For further reference, you can check this too (https://salesforce.stackexchange.com/questions/148242/are-global-attributes-possible-in-lightning-component).


Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks.