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
Jim ZhanJim Zhan 

Custom Buttons (or Links)

Can I make custom button conditionally appear on a detail page? If yes, how can I do that? Otherwise, any tricky way to do so?
ClaiborneClaiborne

You can create different record types for the object being shown in the custom detail. You can create record types with the Enterprise or Unlimited editions. Then each record type can have its own layout, i. e., different buttons, different fields, different pick lists. The problem is making sure that the right record type is assigned so that the right buttons show.

An alternative is to use custom formulas as buttons. This was the way you used to have to create custom buttons. You create a formula that is text that includes a hyperlink. You can even reference an image file to make it look like a button.

This is the formula used in the MapQuest integration for its button:

HYPERLINK("/servlet/servlet.Integration?lid=01N600000008nKe&accountId="&Id ,
IMAGE("/servlet/servlet.ImageServer?oid=00D300000006Dv6&id=01560000000FRAQ", "Click to Map"))

With the right logic, you may be able to create different links with different images to create what you want.