ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] Table 5715 "Item Substitution" procedure "CreateInterchangeableItem"
Describe the request
Hello, we need an event to hook on to fill custom fields before modify/insert.
local procedure CreateInterchangeableItem()
var
ItemSubstitution: Record "Item Substitution";
begin
ItemSubstitution.Type := "Substitute Type";
ItemSubstitution."No." := "Substitute No.";
ItemSubstitution."Variant Code" := "Substitute Variant Code";
ItemSubstitution."Substitute Type" := Type;
ItemSubstitution."Substitute No." := "No.";
ItemSubstitution."Substitute Variant Code" := "Variant Code";
SetDescription(Type.AsInteger(), "No.", ItemSubstitution.Description);
ItemSubstitution.Interchangeable := true;
--------------------------------------------------------------
OnBeforeModifyInsertItemSubstitution(Rec, xRec, ItemSubstitution);
--------------------------------------------------------------
if ItemSubstitution.Find() then
ItemSubstitution.Modify()
else
ItemSubstitution.Insert();
end;
Additional context
We need it to insert values in our custom fields. Needed in: Table 5715 "Item Substitution" Procedure "CreateInterchangeableItem"
### Tasks
Internal work item: AB#492840
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 14606.