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
Anil DuttAnil Dutt 

Create custom save button

Hi,

I want to add cutom buttons "Save" and "Save and Send" in a custom object

I added custom buttons in custom objetcs but not able to show these in Edit Page Layout

How can i accomplish this, please advice

Thanks

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

I suspect this is because you are using a standard list controller (based on the recordSetVar attribute) - to override the edit button you must be using the regular standard controller AFAIK.

All Answers

DeveloperSfdc10.10DeveloperSfdc10.10

Hi Anil,

 

It is correct that you can see only three buttons Save, Svave and New and Cancel on Edit page layout.

I think it is not possible to show the custom buttons on edit layout because every time our requirement is that if the page is in edit mode than we are not suppose to do anythink other than "Save", "Save and New" or "Cancel".

 

Thanks

Developer

neelam4435@gmail.comneelam4435@gmail.com

Hi,

 

Create a custom Edit page.........here u can add buttons as per your need.

Anil DuttAnil Dutt

Hi,

 

i have created a vf page

 

<apex:page standardController="Itinerary__c" recordSetVar="Itinerary__c" tabStyle="Itinerary__c">
    <apex:form >
        <apex:pageBlock title="Itinerary Edit" mode="edit">
            <apex:pageMessages />
            <apex:pageBlockButtons location="top">
                <apex:commandButton value="Save" action="{!save}"/>
                <apex:commandButton value="Save and Send" action="{!save}"/>
                <apex:commandButton value="Cancel" action="{!cancel}"/>
            </apex:pageBlockButtons>
            <apex:pageBlockTable value="{!selected}" var="opp">
                <apex:column value="{!opp.Itinerary__c}"/>
                <apex:column headerValue="Itinerary Name">
                    <apex:inputField value="{!opp.Itinerary__c}"/>
                </apex:column>
            </apex:pageBlockTable>      
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

 

but this page is not coming in "Override With" when trying to override Edit button

 

Any Idea?

bob_buzzardbob_buzzard

I suspect this is because you are using a standard list controller (based on the recordSetVar attribute) - to override the edit button you must be using the regular standard controller AFAIK.

This was selected as the best answer
neelam4435@gmail.comneelam4435@gmail.com

App Setup
Accounts
Buttons and Links
Standard Buttons and Links
Click on Edit in front of Edit
Override Properties
Override With---Visualforce Page
Save