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
Norbert WieruszewskiNorbert Wieruszewski 

Button with OnClick calls ActionFunction with function is not defined error

Hi guys I have a following problem:
I added a new button on Account type that OnClick executes JavaScript Function called "makeSensitive()"
On Visualforce Page with standard Account controller I used Account details with this button and also added an ActionFunction with name "makeSensitive".
The problem is that on my Dev / Staging / UAT ORGs everything works fine but in production on clicking this button users get alert with message that "makeSensitive" function is not defined.
What can be the reason?
SalesFORCE_enFORCErSalesFORCE_enFORCEr
Hi Norbert,

Please share your code.
Norbert WieruszewskiNorbert Wieruszewski
<apex:page standardController="Account">
    <apex:form >
        <apex:detail inlineEdit="false" showChatter="true" relatedList="true"/>
        <apex:actionFunction name="makeSensitive" action="{!myAction}" rerender="popup" />
         <apex:outputPanel id="popup" Visible="{!IsPopUp}">
         </apex:outputPanel>
    </apex:form>
</apex:page>

Button Behavior: Execute JavaScript
Content Source: OnClick JavaScript
OnClick JavaScript: makeSensitive();

Norbert WieruszewskiNorbert Wieruszewski

Finally I had opportunity to check this on Production.

Result: Page wasn't overridden.