I have created a custom object and on the object i have created a custom button. when click on the button it send an email. And a pop up comes with a message "you have send an email". Now i have create a custom setting. I need to customize the popup message. I want to display the message from the custom setting. I am using Behavior of the button as Execute JavaScript. my code :

OnClick JavaScript:

var r = confirm("This position details would be shared with CM-Focus Staffing services.");
if(r == true)
   alert("CM-Focus Staffing Services have been notified. CM-Focus would be in touch with the    hiring manager shortly");

How can i achieve it. Please guide me to get the solution.

  • Did you consider custom labels ? Apr 9, 2014 at 7:31

1 Answer 1


Say we have a custom setting object named "MySettings__c" and a setting in it named "Setting1", so we can access it directly from the custom button code:

  • only if the custom setting is a hierarchy type ;-)
    – brovasi
    Apr 9, 2014 at 8:06
  • And what if it is list?
    – AnuRaj
    Apr 9, 2014 at 8:17
  • I don't think you want to use a list setting for the simple text output? Apr 9, 2014 at 8:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .