Prevent Report Combine Shipments from stopping when error

poppins
Member Posts: 647
Hi everyone,
I need to make standard report 295 "Combine Shipments" work like standard report 296 "Batch Post Sales Orders", meaning if there is an error, the treatment does not stop and the error mesage is not displayed.
How shall I proceed about that?
Thanks in advance
I need to make standard report 295 "Combine Shipments" work like standard report 296 "Batch Post Sales Orders", meaning if there is an error, the treatment does not stop and the error mesage is not displayed.
How shall I proceed about that?
Thanks in advance

0
Comments
-
At least, can anyone tell me how codeunits like codeunit 80 or 90 work on error handling (when error they don't stop but move to the next order)?0
-
Actually codeunits 80 and 90 DO stop on error. It is the calling process that continues (like report 296 Batch Post Sales Orders) , using the IF CODEUNIT.RUN ... construct:
IF IsApprovedForPostingBatch THEN IF SalesPost.RUN("Sales Header") THEN BEGIN CounterOK := CounterOK + 1;
Jan Veenendaal0 -
Jan Veenendaal wrote:Actually codeunits 80 and 90 DO stop on error. It is the calling process that continues (like report 296 Batch Post Sales Orders) , using the IF CODEUNIT.RUN ... construct:
IF IsApprovedForPostingBatch THEN IF SalesPost.RUN("Sales Header") THEN BEGIN CounterOK := CounterOK + 1;
May be I didn't explain what I need clearly, but this is what I want, I want the calling process to continue with no error message shown...
How can I perform that?0 -
So all you need to do is create a process that selects all records to be processed, and let that process call your codeunit (this only works for codeunits) for each record:
use IF CODEUNIT.RUN(CODEUNIT::MyCodeunit, Rec) THEN ...
or use IF MyCodeunit,RUN(Rec) THEN ...
And it will work. You might want to use GETLASTERRORTEXT / CLEARLASTERROR commands to be able to store the errormessages you get during the process.Jan Veenendaal0
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