Hi
modify("Create &Warehouse Shipment")
{
trigger OnAfterAction()
begin
end;
}
The piece of code you have shared is one of the ways of solving your problem. What I mean in my previous post was by creating a subscriber codeunit like below.
codeunit 50100 "Event Subscriber"
{
EventSubscriberInstance = StaticAutomatic;
trigger OnRun()
begin
end;
[EventSubscriber(ObjectType::Page, Page::"Sales Order", 'OnAfterActionEvent', 'Create &Warehouse Shipment', true, true)]
local procedure OnAfterActionEvent_CreateWarehouseShipment(var Rec: Record "Sales Header")
begin
// Build your logic here
end;
var
myInt: Integer;
}
And also as for my understanding of the requirement, you need to change the amount also while creating the Shipment. For that also you can create an event subscriber like above and change your amount in the shipment.
Regards
Avinash B