Popup message when user apply changes in the system.

heeheelim
Member Posts: 17
I wish to create a popup confirmation message whenever user exit from a screen with changes applied.
For example, when a user exit from the Item form while adding a new item or modify the existing item, the system will prompt a confirmation message whether to save the changes.
If the user select ‘Yes’ the system will apply the changes but if the user choose ‘No’ the system will discard the changes.
If the user doesn’t complete all the columns in order for the system to apply the changes, the system will prompt out a message saying that the necessary column is not complete and the system will go back to the previous screen for user to complete the necessary column.
I would like to remove the Escape function to ensure that user exit from the screen properly.
Objective :
1. To minimize error while maintaining the system.
2. To make sure chnages that done by user is apply
Does anyone know how can i make it? thanks..
For example, when a user exit from the Item form while adding a new item or modify the existing item, the system will prompt a confirmation message whether to save the changes.
If the user select ‘Yes’ the system will apply the changes but if the user choose ‘No’ the system will discard the changes.
If the user doesn’t complete all the columns in order for the system to apply the changes, the system will prompt out a message saying that the necessary column is not complete and the system will go back to the previous screen for user to complete the necessary column.
I would like to remove the Escape function to ensure that user exit from the screen properly.
Objective :
1. To minimize error while maintaining the system.
2. To make sure chnages that done by user is apply
Does anyone know how can i make it? thanks..
Regards.
0
Comments
-
You could make some changes to the Change Log functionality to avoid to make changes on every form where you want to add this feature:
- Add a new field "Confirm Changes" (type Boolean) to table 403 "Change Log Setup (Table)" & form 593 "Change Log Setup (Table) List".
- Activate Change Log for table 27 Item and place a checkmark in the new field
- Modify function GetTableTriggerMask in codeunit 423 "Change Log Management"://*** 001 BEGIN // IF "Log Modification" <> "Log Modification"::" " THEN IF ("Log Modification" <> "Log Modification"::" ") OR("Confirm Modification") THEN //*** 001 END
- Add following code at the start of function LogModification in codeunit 423 "Change Log Management"://*** 001 BEGIN IF NOT ChangeLogSetupRead THEN BEGIN IF ChangeLogSetup.GET THEN; ChangeLogSetupRead := TRUE; END; IF recChangeLogSetupTable.GET(RecRef.NUMBER) THEN; IF ChangeLogSetup."Change Log Activated" THEN BEGIN IF recChangeLogSetupTable."Confirm Changes" THEN BEGIN IF NOT CONFIRM('Do you want to save changes?') THEN BEGIN FOR i := 1 TO RecRef.FIELDCOUNT DO BEGIN FldRef := RecRef.FIELDINDEX(i); xFldRef := xRecRef.FIELDINDEX(i); IF IsNormalField(RecRef.NUMBER,FldRef.NUMBER) THEN IF FORMAT(FldRef.VALUE) <> FORMAT(xFldRef.VALUE) THEN FldRef.VALUE := xFldRef.VALUE; END; EXIT; END; END; END; //*** 001 END
Hope this gets you started.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions