OnQueryClose in Page
armela20
Member Posts: 71
Hi there.
I have added some code to not leave the Customer page when the Address field is not filled in.
This works great when u are in a edit mode or Create new mode. If I click ok or the X button on the page my page will not close and my users are forced to fill in the info.
Now here is the challenge.
When I delete a customer record, it thinks that my address field is still not filled it. I added code to say if "No." <>'' then run the code but that does not work, as at that point the "No." field still holds the value.
I added some messages and it seems like the OnQueryclose is run before the delete trigger on the page.
Has anyone done smth like this before ??
Any suggestion as to where should I add my code so that this works. It really works great on existing on new customers, but when user deletes a customer they can not leave the page and that is truly a show stopper as they are stuck on that page now.
Any help is much appreciated.
I have added some code to not leave the Customer page when the Address field is not filled in.
This works great when u are in a edit mode or Create new mode. If I click ok or the X button on the page my page will not close and my users are forced to fill in the info.
Now here is the challenge.
When I delete a customer record, it thinks that my address field is still not filled it. I added code to say if "No." <>'' then run the code but that does not work, as at that point the "No." field still holds the value.
I added some messages and it seems like the OnQueryclose is run before the delete trigger on the page.
Has anyone done smth like this before ??
Any suggestion as to where should I add my code so that this works. It really works great on existing on new customers, but when user deletes a customer they can not leave the page and that is truly a show stopper as they are stuck on that page now.
Any help is much appreciated.
0
Comments
-
why delete the customer instead of just blocking it?
if you search the forum for "mandatory fields" you'll see other options on how to avoid blank fields.
the one i like is defaulting any new customer to blocked. Then use testfield function to test for values in the mandatory fields when someone tries to unblock it and make it active. This forces them to fill in all desired fields before unblock is allowed. You also then add property notblank to those fields so nobody can clear them afterwards.
done 8)0 -
Very smart!it is definitely to add to my "best practices" list!thank you :thumbsup:Savatage wrote:why delete the customer instead of just blocking it?
if you search the forum for "mandatory fields" you'll see other options on how to avoid blank fields.
the one i like is defaulting any new customer to blocked. Then use testfield function to test for values in the mandatory fields when someone tries to unblock it and make it active. This forces them to fill in all desired fields before unblock is allowed. You also then add property notblank to those fields so nobody can clear them afterwards.
done 8)0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 328 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