Confirm Add New Part

shane
Member Posts: 20
Hello all,
My company has Navision 4.0 SP1 and we have the Item table set to automatically assign a number when creating part numbers. The problem is that people are looking at the item card and scrolling to the last number and then accidentally creating a new part when they TAB off the blank number field.
So what I did is this on the Item Card:
But this is not the best solution. I would like it if rather than ERROR(‘’) I could just set the card to the last item number and not exit the card. I have tried several things to accomplish this and I keep having problems.
Any suggestions?
My company has Navision 4.0 SP1 and we have the Item table set to automatically assign a number when creating part numbers. The problem is that people are looking at the item card and scrolling to the last number and then accidentally creating a new part when they TAB off the blank number field.
So what I did is this on the Item Card:
Form - OnNewRecord(BelowxRec : Boolean) IF CONFIRM('Are you sure you want to create a new part?') = FALSE THEN BEGIN ERROR(''); END;
But this is not the best solution. I would like it if rather than ERROR(‘’) I could just set the card to the last item number and not exit the card. I have tried several things to accomplish this and I keep having problems.
Any suggestions?
0
Answers
-
I'd probably make the No. field not editable, and give the user a button or a selection on the Functions menubutton to create a new Item.0
-
Hi shane,
please try this...Form - OnInsertRecord(BelowxRec : Boolean) : Boolean IF NOT CONFIRM('Are you sure you want to create a new part?',FALSE) THEN EXIT(FALSE); EXIT(TRUE);
0 -
Instead of using OnNewRecord, use OnInsertRecord. Then you can do this:
Form - OnInsertRecord(BelowxRec : Boolean) : Boolean
IF NOT CONFIRM('Are you sure you wanna make da new item?') THEN BEGIN
GET(xRec."No.");
EXIT(FALSE);
END;
The Get will reposition to the last record you were on. If you want it to go to the last record just change it to find('+').0 -
Brilliant, thank you guys…
…my final solution looks like your suggestion ashadam999:Form - OnInsertRecord(BelowxRec : Boolean) : Boolean IF NOT CONFIRM('Are you sure you want to create a new part?') THEN BEGIN GET(xRec."No."); EXIT(FALSE); END;
I like "GET(xRec."No.");". This behaves better than I originally had in mind.
Thanks again,
Shane0
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