Need to test record before moving to new record on form
 
            
                
                    happyjoy                
                
                    Member Posts: 10                
            
                        
            
                    My customer has two order entry methods.  On the customized version ONLY they want to check to be sure that one of two flags is set on the order header before allowing the user to go to a new order (either by inserting, paging up/down, or ending the sesssion).  The goal is to force the user to set one of the flags before leaving the order.
I'm not sure how to do this and have it not close the form. Any error on the form triggers seems to do this. Yet, I can't put code on the record unless I find a way to condition it to the customized entry form only.
Any ideas (...she says on bended knee!)? :roll:
                I'm not sure how to do this and have it not close the form. Any error on the form triggers seems to do this. Yet, I can't put code on the record unless I find a way to condition it to the customized entry form only.
Any ideas (...she says on bended knee!)? :roll:
"For in much wisdom is much grief, and he who increases knowledge increases sorrow." - Eccl. 1:18
0                
            Comments
- 
            onQuerycloseform()if NOT Flag1 and NOT Flag2 THEN BEGIN MESSAGE('You MUST enter a value into one of the flags! DOH!"); EXIT(FALSE); END;
 but you'll need to add some code in other places - like on next record, etc etc.
 if you search the forum for "mandatory fields" you'll probably get some other good ideas.0
- 
            happyjoy wrote:My customer has two order entry methods. On the customized version ONLY they want to check to be sure that one of two flags is set on the order header before allowing the user to go to a new order (either by inserting, paging up/down, or ending the sesssion). The goal is to force the user to set one of the flags before leaving the order.
 I'm not sure how to do this and have it not close the form. Any error on the form triggers seems to do this. Yet, I can't put code on the record unless I find a way to condition it to the customized entry form only.
 Any ideas (...she says on bended knee!)? :roll:
 You can eventually get this to work, using Harry's suggestion , this is a case of you trying to solve a bud business process with code. This just is not how NAV works. Instead talk with the client not about HOW they want to achieve this, but WHY, as in what are they trying to achieve.
 This "solution" will have lots of repercussions, and you will be continuously be writing fixes.
 Look for a solution where the user can enter the order the NAV way, and trigger the warning or what ever at some later point with a different trigger.David Singleton0
- 
            I fully agree with David on this. You can do that, but it is not good way, because other users which are just listing the orders will be annoyed by this, because it is not their fault that something is missing.
 If the checkboxes must be checked before someone start the posting, better is to check them before the posting (e.g. during Release of the document).0
- 
            
 I agree as above, but I also wanted to show that it is possible to stop the closing as asked 8)happyjoy wrote:I'm not sure how to do this and have it not close the form. Any error on the form triggers seems to do this.
 Any ideas (...she says on bended knee!)? :roll: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
- 323 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


