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
Chris BenenatiChris Benenati 

Comments in Custom Button and Formula definitions

When using the the salesforce GUI to define Custom Buttons and Formulas, is it possible to include comment lines within the code?
Best Answer chosen by Chris Benenati
Hargobind_SinghHargobind_Singh
Hi, if you are using javascript in custom buttons, you should be able to include comments. I haven't tried though.

You can use comments in forumula fields as well, try enclosing them in /* */  . Here is an old idea that was already delivered a while ago  : https://success.salesforce.com/ideaView?id=08730000000BpIWAA0


ps: If this resolves your query, please mark this post as resolved so that others can benefit from the solved questions. 

All Answers

Hargobind_SinghHargobind_Singh
Hi, if you are using javascript in custom buttons, you should be able to include comments. I haven't tried though.

You can use comments in forumula fields as well, try enclosing them in /* */  . Here is an old idea that was already delivered a while ago  : https://success.salesforce.com/ideaView?id=08730000000BpIWAA0


ps: If this resolves your query, please mark this post as resolved so that others can benefit from the solved questions. 
This was selected as the best answer
Chris BenenatiChris Benenati
I am aware of the JavaScript comment.  Is there any way to do it if the Behavior is not "Execute Javascript"? (I have long URLs with lots of cryptic field IDs).  Thanks for the hint about formula and validation fields.