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
Dorel4Dorel4 

Custom Button and Error message

I am trying to create a custom button on the Opportunity Page to update the stage.  After you click the button you select from the picklist and hit save. I have used similar code for a button on a list view but I am getting an error message: Field Save does not exist check spelling

Here is my code, I am not sure what I am doing wrong.  Why isn't Save an action not a field?  Thank you.
<apex:page standardController="Opportunity" showHeader="true">
        <apex:form>
        <apex:pageBlock title="Opportunity Stage-Update" mode="edit" id="mub1">
            <apex:pageMessages />
            <apex:pageBlockSection id="mus1">
                <apex:inputField value="{!opportunity.stagename}"> id="stagename">
                                    </apex:inputField>
                                               </apex:pageBlockSection>
           <apex:pageBlockButtons location="bottom" id="mubut">
                <apex:commandButton value="Save" action="{!save}"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
        <apex:pageBlock title="Select Stage" id="muselectedlist">
            <apex:pageBlockTable value="{!selected}" var="opp" id="mutab">
                                <apex:column value="{!opp.stagename}" id="oppstage"/>
            </apex:pageBlockTable>
           </apex:pageBlock> </apex:form>
        </apex:page>
 
Best Answer chosen by Dorel4
Dorel4Dorel4
I finally got it to work.  If anyone else needs it.  I created a Visualforce page. 

<apex:page standardController="Opportunity"
           showHeader="false"
    id="muopp"
>
    <apex:form id="muform">
               <apex:pageBlock title="Opportunity Stage-Update" mode="edit" id="mub1">
            <apex:pageMessages />
            <apex:pageBlockSection id="mus1">
                <apex:inputField value="{!opportunity.stagename}" id="stagename">
                    <apex:actionSupport event="onchange" rerender="muselectedlist"/>
                </apex:inputField>
            </apex:pageBlockSection>
            <apex:pageBlockButtons location="bottom" id="mubut">
                <apex:commandButton value="Save" action="{!save}" id="butsav"/>
                <apex:commandButton value="Cancel" action="{!cancel}" id="butcan"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
           </apex:form>
</apex:page>