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

How to add a Custom Setting in a Custom Button

Hello Community,


I'm not able to add a Custom Setting value to a Custom Button onClick JS.

The error is :

Error: You referenced an unsupported field type called "Lookup" using the following field: Cid__c


When trying to reference :



How can i reference a custom setting value inside the js of a onclick Js custom button?


Anyone got any ideas?


If it is a hierarchy custom setting you may be able to use $Setup.<custom setting api name goes here>.<custom setting field name goes here>.  


For sure that will not work for a list custom setting.  In that case you can query it like any other object.