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
Ganesh EkhandeGanesh Ekhande 

Can we access $Setup global variable on lightning component?

I want to access Default Organization Level Value for one of the field on custom setting on Lightning component. I know we can access it on visualforce using  $Setup global variable, but I dont see anything mentioned in documentation for the lightning. I know we can access it using Apex side controller.But before going for that approach I want to make sure if we can access it directly using global variable.
Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Ganesh,

May I suggest you please refer the below link for reference on a global variable on lightning component. Hope it will be helpful.

Best Regards
Rahul
Ganesh EkhandeGanesh Ekhande
@Rahul : I actually want to access org level default vaues of custom setting on lightning component. I can access custom labels using global variable ($Label) but I am not sure if we can access custom setting. I know, I can access custom setting data on lightning component through server side controller.but I did not get any information on how to access custom setting data on LC using global variable. 
Priti jaiswal 8Priti jaiswal 8
Hi Ganesh,

There is no direct way to access custom setting in lightning. The only way to access custom setting is using server side controller.

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