HideDialog When background process create pick list

samantha73
Member Posts: 118
Hi All
I'm struggling to hide the dialog box (nothing to handle ) when creating warehouse picks from code unit. The aim is to create a process that can be run using job queue that process warehouse shipments and create warehouse picks. When there is inventory or no prior pick list for the Whse Shipment the code works but other wise "nothing to handle error" comes up. I'm using report "Whse.-Shipment - Create Pick" but no idea how to suppress pop up errors:
here's the code so far for the codeunit:
Not sure how to use integration events or access them when running the code unit above. Below is one event
. Perhaps there is a different way to solve this?
Thanks
I'm struggling to hide the dialog box (nothing to handle ) when creating warehouse picks from code unit. The aim is to create a process that can be run using job queue that process warehouse shipments and create warehouse picks. When there is inventory or no prior pick list for the Whse Shipment the code works but other wise "nothing to handle error" comes up. I'm using report "Whse.-Shipment - Create Pick" but no idea how to suppress pop up errors:
here's the code so far for the codeunit:
trigger OnRun() var WhseShptHeader: Record "Warehouse Shipment Header"; WhseShptLine: Record "Warehouse Shipment Line"; WhseShipmentCreatePick: Report "Whse.-Shipment - Create Pick"; IsHandled: Boolean; HideValidationDialog: Boolean; // NewHideValidationDialog: Boolean; HideNothingToHandleErr: Boolean; // HideNothingToHandleError: Boolean; begin HideValidationDialog := true; HideNothingToHandleErr := true; // NewHideValidationDialog := true; // HideNothingToHandleError := true; WhseShptHeader.SetFilter("No.", '=%1', 'WS0000281'); WhseShptHeader.setrange(Status, WhseShptHeader.Status::Released); if WhseShptHeader.FindFirst() then WhseShptLine.SetRange("No.", WhseShptHeader."No."); WhseShptLine.SetFilter(Quantity, '>0'); WhseShptLine.SetRange("Completely Picked", false); if NOT WhseShptLine.FindSet() then exit else begin WhseShipmentCreatePick.SetWhseShipmentLine(WhseShptLine, WhseShptHeader); WhseShipmentCreatePick.SetHideValidationDialog(HideValidationDialog); WhseShipmentCreatePick.UseRequestPage(not HideValidationDialog); WhseShipmentCreatePick.RunModal; WhseShipmentCreatePick.SetHideNothingToHandleError(HideNothingToHandleErr); //WhseShipmentCreatePick.GetResultMessage; Clear(WhseShipmentCreatePick); end; end;
Not sure how to use integration events or access them when running the code unit above. Below is one event
[IntegrationEvent(false, false)] local procedure OnBeforeSortWhseActivHeaders(var WhseActivHeader: Record "Warehouse Activity Header"; FirstActivityNo: Code[20]; LastActivityNo: Code[20]; var HideNothingToHandleError: Boolean) begin end;
. Perhaps there is a different way to solve this?
Thanks
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
- 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