Version: 23.2.14
Hello,
The page has an Interactive Grid. It allows Managers to be transferred to other stores (retail), removed from stores (transferred, vacation, etc.), added to the store. The country is divided into Regions (which are the States) and each Region has someone responsible for the stores in that Region. The Interactive Grid has an LOV that is contains the Region(s) assigned to the User. Each week they must submit any changes that are needed for the stores in their Region(s). IF there are no changes for the Region, they must submit a “No Changes Made” submission. I've created a Modal Page for this. I have a button that they will click that opens the Modal Page, they select their Region and click a Submit button. The Modal closes and control are passed to the Parent.
The issue: During testing if a Region is selected in the Interactive Grid (though it's not necessary) and THEN they click the “No Changes” button. When the Modal closes, the Interactive Grid is saved creating an additional record. ALL page processes are set to ‘Request is contained in value’ because I have a Confirmation alert asking if they're sure they want to submit their changes. After the changes are submitted, they cannot submit any other changes for that Region till the following week. I have the LOV query for the Region set up to NOT display the Region that they already submitted for that week.
According to docs, the Suppress Changes is ignored returning from a Modal Page!!
How do I stop the Interactive Grid from saving the record returning from the Modal Page and/or Refresh the Interactive Grid without the ‘Warn Changes’ alert?
The Dialog Close DA set up:
Name: Dialog Close
Event Scope: Static
Type: Immediate
When → Event → Dialog Close
Selection Type: Javascript Expression
Javascript Expression: document
True Action: ( many things that don't stop the save or don't stop the ‘Warn Changes …’ alert )
Action: Execute Javascript
Code: apex.region("MGR_UPD").refresh(); //warn changes alert
apex.page.submit( ignoreChange (true)); //no warn changes alert but record saved
Action: Refresh
Affected Elements: Region
Region: <region name> //warn changes displayed
Can someone help me with this?
Thanks,
Joe