I have a custom button that has a custom label: enter image description here

for the custom label of sharepointLink: the value has just like this: url.aspx

But when clicking the custom button, it shows like this: enter image description here

Is it possible to put the custom label in a custom button? If so, is my syntax for the javascript correct or not?


Correct the syntax {&Label.sharepointLink} to {!$Label.sharepointLink}


That should work fine. I just tested in my org with a custom label called Label with the following Javascript on a custom button:


The text I had set up was 'Sample' and when I clicked the custom button on my object it correctly alerted the word Sample.

In your case it seems you are not using correct syntax.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.