Suppress/redirect error messages

NickA
Member Posts: 32
Hi,
I'm working on one of my first major Navision projects which is an ASCII interface from Navision to my companies core Warehouse Management System. I'm running this from a standard client, but the interface needs to run unattended at timed intervals.
The interface works, but I start getting problems with standard Navision validation - for instance if the interface tries to post a sales order but somebody hasn't set up something correctly - the standard Navision validation kicks in and pops up an error dialog, stopping the interface in it's tracks.
I'd really prefer to be able to trap these errors, write a message to a log somewhere then continue processing the next record.
Is there any easy way to do this?
Thanks in advance,
NickA.
I'm working on one of my first major Navision projects which is an ASCII interface from Navision to my companies core Warehouse Management System. I'm running this from a standard client, but the interface needs to run unattended at timed intervals.
The interface works, but I start getting problems with standard Navision validation - for instance if the interface tries to post a sales order but somebody hasn't set up something correctly - the standard Navision validation kicks in and pops up an error dialog, stopping the interface in it's tracks.
I'd really prefer to be able to trap these errors, write a message to a log somewhere then continue processing the next record.
Is there any easy way to do this?
Thanks in advance,
NickA.
0
Comments
-
We have encountered this type of issue, and although have no solution, have a pretty good workaround.
What we do is identify, to the best of our abilities, what fields need to be filled out in the document.
When your interface runs, first run a batch routine that checks each of these fields. If something is not filled properly, do not post / insert this record but instead insert a record into a new table called 'Interface Errors' or something like that. We have a form running (based on the error table), that runs batch routines once every couple of minutes, and displays potential errors in the error table. The errors can be identified and corrected before the batch routine will insert the record / post the transaction.
My current project has this logic happening on two different fronts, integrating with a third party warehouse management system, which can feed us 10-20 records a minute (and we feed them a similar amount), and our add on which records different inventory and feeds Navision 50-100 records a minute, and automatically posts all of these records every 2 minutes. Out batch routines are written to avoid any potential errors during posting (optimistic of course!), but we have done this sort of integration for years and found that as long as you can identify what could go wrong with every single field you integrate with (not a small task but utterly important), then this type of integration can operate smoothly.
-A0 -
Ah, that's a shame.
I have implemented pre-validation as you describe but as you also say... it's a big job and difficult to find all the possible things that can go wrong - especially when the problem isn't just populating fields, it's whether a sales order/purchase order posting routine runs too.
Cheers.0 -
If you look into objects used with service scheduling management, you can see, that if you call codeunit run function and read his return value ( ret := c.run;), if there is error in the codeunit risen, message will not popup but return value will be false!!! If all is ok codeunit return true!
This is the way how to catch errors without pop up window. You need only one thing - how to find what is wrong ;-) (there is no GetLastError or something)
see Form 6094
function CheckAndRunScheduler
line "IF RunObjectFromJobSched.RUN(JobSchedSetup) THEN BEGIN"0 -
Yea, it helps to try and keep the integration as simple as possible, try and keep the information that is flowing to a minimum.
For example, one of our integrations is the picking of items for a sales invoice. We send to our third party the Sales Invoice number, and line number, Item Number (and description for information), and base quantity to be picked. They send us back the invoice number, line number, & item number. So we validate that the invoice, line and item match, and fill in the base quantity on the line.
There is no reason for them to send us back the description or bin location, or for us to send them the customer or pricing details. No need to send the units of measure, our master files and business logic removed this requirement. We scrutinized the datasets a great deal to be as simple as possible.
I can understand your frustration - beleive me we have been there, but what we have found (if this is encouraging), is that at the beginning of the project, the setup is incomplete and the users are novices. As the setup becomes more complete, and the users more experienced, the data will be more complete.
-A0 -
To kine -
Great! If it errors I'll just log a general message that'll tell them to try posting manually.
'course it still won't hurt to try and pre-validate - a little more controlled that way.
Thanks,
NickA0
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