Replace existing record

lightning
Member Posts: 15
I have a table with 2 fields in the key. I would like to receive a confirm dialog if i try to input data in a Card of a record that already exists with that key, to choose if i want to replace it or not. However when i input a key that already exists, NAV has it's own error that says there is such a record. Is there a way to supress this error or somehow do it so i can:
-Input data in a Card
-Press OK
-If NAV sees, that a record with such a key already exists, it asks me if i want to replace it
any help greatly appreciated
-Input data in a Card
-Press OK
-If NAV sees, that a record with such a key already exists, it asks me if i want to replace it
any help greatly appreciated
0
Best Answer
-
Solved it with delayed insert, now i can check my own conditions before inserting a whole record including duplicate primary key0
Answers
-
I don't have a solution, as I have never had the need.
But I would start out with not working directly in the table. So maybe make a extra card for creation, and bind that to a temp table, and the put your logic in that card.
But the reason for not having had the need, is that it doesn't really make sense.
If the record exist, then the primary key is already in place and you can just change the other fields, or create a action that clears all the fields.
Follow me on my blog juhl.blog0 -
Solved it with delayed insert, now i can check my own conditions before inserting a whole record including duplicate primary key0
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