Rollback Transaction
mkpjsr
Member Posts: 587
Hi all,
I want to know that how can we rollback transaction in navision. As we see while posting any document in navision if any error occur then the whole transaction is rollbacked.
suppose I have a custom field on purchase invoice that should meet certain criteria before posting. if someone tries to post the invoice without meeting the criteria (say the field should have a value less than 50) of the custom field then it should give an error and the document should not be posted.
how can we do this..
I want to know that how can we rollback transaction in navision. As we see while posting any document in navision if any error occur then the whole transaction is rollbacked.
suppose I have a custom field on purchase invoice that should meet certain criteria before posting. if someone tries to post the invoice without meeting the criteria (say the field should have a value less than 50) of the custom field then it should give an error and the document should not be posted.
how can we do this..
0
Comments
-
Without knowing your exact setup I say: use TESTFIELD, ERROR or FIELDERROR function (posible combined with and IF statement).0
-
If you have required values, test for them at the beginning of you posting process. Before any data changes have been made. This way if an error is found nothing has changed yet. So there is nothing to rollback.There are no bugs - only undocumented features.0
-
bbrown wrote:If you have required values, test for them at the beginning of you posting process. Before any data changes have been made. This way if an error is found nothing has changed yet. So there is nothing to rollback.
Thanx for the reply,
Suppose On Sales Order I want that if The "Qty. To Ship" is greater than 100 then its should give an error, so where should I call the TESTFIELD function.0 -
Early in CU 80. Before any data modification (insert,modify,delete) statements are executed.There are no bugs - only undocumented features.0
-
mkpjsr wrote:bbrown wrote:If you have required values, test for them at the beginning of you posting process. Before any data changes have been made. This way if an error is found nothing has changed yet. So there is nothing to rollback.
Thanx for the reply,
Suppose On Sales Order I want that if The "Qty. To Ship" is greater than 100 then its should give an error, so where should I call the TESTFIELD function.
if "Qty. To Ship" > 100 then
ERROR('"Qty. To Ship" is greater than 100');
TESTFIELD always checks for an exact match.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
- 322 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
