Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom buttons, dirty form, and unsaved changes message

PalmieriRachael
Contributor

Hi all!

I have a few different custom javascript buttons that are causing Archer's unsaved changes message to appear when I don't expect it to. Below are a couple of examples:

  • Scenario #1: Custom button replicates clicking a button in the AWF Action menu  
    • <a href="javascript&colon;void(0);" onclick="javascript&colon;transitionNode(10);return false;" role="button">Submit Plan for approval</a>
  • Scenario #2: Custom button to call a custom JS function
    • <a id="custom-cancel" href="javascript&colon;void(0);" onclick="javascript&colon;cancelFinding(fieldID,valueID);" role="button">Cancel finding</a>
    • This code simply finds a specific values list field on the form and sets it to a specific value. It then saves the record.

In the first scenario, if I change the onclick to "javascript&colon;transitionNode(10);$('#master_btnApply').click();return false;" I don't see the unsaved changes message any more.

In the second scenario, I'm already calling $('#master_btnApply').click(); at the very end of my custom function.

Is there a better or more elegant way to force Archer to know the form is not dirty? I don't technically have a solution for the second scenario at this point. Any suggestions would be helpful. Thanks!

0 REPLIES 0