How to store the error messages in Navision while posting PO
abhishekpareek
Member Posts: 150
Hi All,
i have a scenario.I am developing a functionality to automate the PO Posting Process.
The process witll update the PO dynamically from another database and will post the PO automatically without user intervention.The PO psoting will be done continuously thorugh NAS.
Now it may happen that while posting the PO to receipts and invoice,some PO will not post and some PO will post.
The calling will be like this for the codeunits:
New codeunit:Call Create PO->will call Purch. Post.
Query:Whether it is possible that all the error message that will come while some PO is not posted can be traced dynamically by and store in the table?
I want to store the error messages in the temporary table so that users can see the error to find out the reasons for failure of posting.
Thanks in advance!
Regards,
Abhishek
i have a scenario.I am developing a functionality to automate the PO Posting Process.
The process witll update the PO dynamically from another database and will post the PO automatically without user intervention.The PO psoting will be done continuously thorugh NAS.
Now it may happen that while posting the PO to receipts and invoice,some PO will not post and some PO will post.
The calling will be like this for the codeunits:
New codeunit:Call Create PO->will call Purch. Post.
Query:Whether it is possible that all the error message that will come while some PO is not posted can be traced dynamically by and store in the table?
I want to store the error messages in the temporary table so that users can see the error to find out the reasons for failure of posting.
Thanks in advance!
Regards,
Abhishek
0
Comments
-
if you use for posting the PO the NAS and you use NAV >5 then you can use the function: GETLASTERRORTEXT() (search for this also the forum or / nd read the online help.
If you use NAV <= 5 the messages will be stored into the windows eventlog.
so, there is this idea:
So if u use if not codeunit.run then codeunit.run <- this wrotes the error into the eventlog.
So you can something do like this viewtopic.php?f=5&t=14129 to store the error message into the event log.
than you get the last event from NAV (for example with WSH) from the eventlog viewtopic.php?f=23&t=9286.
don't forgett, that the NAS doesn't like confirms and Dialogwindows. So if you use the posting codeunit also for users with guids and for the NAS you must set a
if GuiAllowed then begin <- if this is not Set (it's false for NAS) the NAS stops working because he can't display this GUI
Window.open('sfds')
.....
end;
RegardsDo you make it right, it works too!0 -
Thanks a lot!Get last error solve my problem.
Regards,
Abhishek0 -
Please, no problemDo you make it right, it works too!0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions