Delete entry after insert

bRahms
Member Posts: 44
Hi,
I have an issue i've been wondering about quite some time now. It's like that:
I have a table filled in with several records: for example : (v = true)
Status Date Status Time Status
23-02-2010 08:12:29 2
24-02-2010 12:10:04 5
Now the thing is, when the boolean has been set to TRUE, the user may not add any other status. He adds a status date, a timestamp and then he adds a statuscode.
When I add a error message on the OnValidate() of the Status field (or even on the OnInsert), he gives me the error message, but the record is allready been made with the datetime. Is there any possibility that i delete the record after the onvalidate of the status?
I have an issue i've been wondering about quite some time now. It's like that:
I have a table filled in with several records: for example : (v = true)
Linenr Waybillnr Boolean Status Status date Status time 1 1000 2 23-02-2010 08:12:29 2 1100 2 23-02-2010 08:16:14 3 1000 v 5 24-02-2010 12:10:04When I have my form based on this table, i have for the detail of Waybillnr 1000:
Status Date Status Time Status
23-02-2010 08:12:29 2
24-02-2010 12:10:04 5
Now the thing is, when the boolean has been set to TRUE, the user may not add any other status. He adds a status date, a timestamp and then he adds a statuscode.
When I add a error message on the OnValidate() of the Status field (or even on the OnInsert), he gives me the error message, but the record is allready been made with the datetime. Is there any possibility that i delete the record after the onvalidate of the status?
0
Comments
-
try to use delayedinsert property, and put the error in the oninsert trigger (of the table)...you can also use testfield function instead of a defined "ERROR" function, in order to not have to manage the text constant multilangage...
TESTFIELD("boolean field");0 -
Thank you, that did the trick0
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