With this event, the user can prevent a production order routing line from being edited. The event will be thrown in the load/reload phase of a VAPS simulation. If the event is not handled, the standard setting of editable = true will be applied.
Example:
All operations of work center 400 get "protected".
[EventSubscriber(ObjectType::Codeunit, Codeunit::"NETVAPS IntegrationMgmt",
'OnProvideProdOrderRoutingLineEditability', '', false, false)]
local procedure handleOnProvideProdOrderRoutingLineEditability(pClientGuid: Guid;
pProdOrderRoutingLinePosition: Text; var pEditable: Boolean; var pHandled: Boolean)
var
_porlRecord: Record "Prod. Order Routing Line";
_count: Integer;
begin
_porlRecord.SetRange("Work Center No.", '400');
_porlRecord.SetPosition(pProdOrderRoutingLinePosition);
if _porlRecord.Find('=') then begin
pEditable := false;
pHandled := true;
end;
end;
|
Data type |
Description |
pProdOrderRoutingLinePosition |
Text |
The production order routing line to be set to "uneditable". |
var pEditable |
Boolean |
The production order routing will be set to "uneditable" if it returns "false". |
var pHandled |
Boolean |
The event will be handled if it returns true |