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
trf199trf199 

How to put custom buttons inline with a field on a standard object?

I'm trying to add a custom button inline with a standard field of a Contact. For instance a Contact page would have a field for e.g. phone number, the layout for the field would be label, number, custom button ("dial").

 

I can think of 3 ways to add custom buttons to the Contact page.

1) add custom buttons in the usual manner to appear at the top and bottom of the page

- These buttons are not inline, you end up with lots of buttons in a row - messy.

 

2) make an s-control which includes the number plus a "dial" button.

-  If you replace the standard field with one made in an s-control you lose the double-click to edit functionality, plus the field doesn't show up in edit mode.

 

3) make an s-control underneath the number, i.e. a blank field, no label, with just a "dial phone" button.

- This is not inline, it's below the number, and is again messy

 

The only other option I can think of is to completely replace the Contact page (and many other pages) with VisualForce replacements. This is not a viable option as it is a huge amount of work, and when SalesForce releases updates the pages would quickly go out of date, etc. etc.

 

Are there any other options I am missing?

 

 

Thanks.

 

TehNrdTehNrd

If this button is a cutom link you can create a fake button with a formula field:

HYPERLINK("/apex/mypage?id=" & Id, IMAGE('/resource/1214511707000/clickHere', 'Click here') ,"_self" )

Where the image is that of something that looks like a button.

 

Message Edited by TehNrd on 09-04-2009 04:42 PM
trf199trf199
Thanks, that's interesting. If I made such a formula field for Contact.Phone how would the user edit the phone number, without having to display the phone number field as well as this new field?
TehNrdTehNrd
That I don't think you can do that. You could place the fake button directly above or beneath but can't have a field only show up on the edit layout and not the view layout without rebuilding the entire page in visualforce, which I would not recommend.