You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 19, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 19, 2026. It is now read-only.
We have a customization to update item weight from base unit of measure.
This code updates all units of measure when updating weight.
I need to be able to exclude the base unit of measure.
local procedure UpdateItemUnitOfMeasureWeight()
var
ItemUOM: Record "Item Unit of Measure";
begin
if IsTemporary then
exit;
if "No." = '' then
exit;
ItemUOM.SetRange("Item No.", "No.");
///
OnUpdateItemUnitOfMeasureWeightOnBeforeCalcWeight(Item,ItemUOM)
///
if ItemUOM.FindSet(true) then
repeat
ItemUOM.CalcWeight(ItemUOM."Qty. per Unit of Measure", "Net Weight");
ItemUOM.Modify();
until ItemUOM.Next() = 0;
end;
[IntegrationEvent(false, false)]
local procedure OnUpdateItemUnitOfMeasureWeightOnBeforeCalcWeight(var Item: Record Item; var ItemUnitOfMeasure: Record "Item Unit of Measure")
begin
end;
Describe the request
We have a customization to update item weight from base unit of measure.
This code updates all units of measure when updating weight.
I need to be able to exclude the base unit of measure.
Internal work item: AB#648438
✅ Analysis complete - ready for further processing
Implementation:
Add a new integration event in UpdateItemUnitOfMeasureWeight() in table 27 Item before FindSet(true) so extensions can adjust the Item Unit of Measure filter before weights are recalculated.
Location in UpdateItemUnitOfMeasureWeight() procedure:
localprocedure UpdateItemUnitOfMeasureWeight()var
ItemUOM: Record "Item Unit of Measure";
beginif IsTemporary thenexit;
if "No." = ''thenexit;
ItemUOM.SetRange("Item No.", "No.");
OnUpdateItemUnitOfMeasureWeightOnBeforeCalcWeight(Rec, ItemUOM);
if ItemUOM.FindSet(true) thenrepeat
ItemUOM.CalcWeight(ItemUOM."Qty. per Unit of Measure", "Net Weight");
ItemUOM.Modify();
until ItemUOM.Next() = 0;
end;
Event Publisher (add at the end of the codeunit with other events):
[IntegrationEvent(false, false)]
localprocedure OnUpdateItemUnitOfMeasureWeightOnBeforeCalcWeight(var Item: Record Item; var ItemUnitOfMeasure: Record "Item Unit of Measure")beginend;
File:Item.Table.al
Note
Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.
Tip
Not accurate? Reply with /not-accurate (optional: add a short explanation). Your feedback improves future responses.
The requested change has been implemented in microsoft/BCApps#10903, and the corresponding Azure Boards work item 648438 is resolved as fixed. Closing this issue as completed.
Activity
github-actions commentedon Aug 31, 2026
✅ Analysis complete - ready for further processing
Implementation:
Add a new integration event in
UpdateItemUnitOfMeasureWeight()in table 27ItembeforeFindSet(true)so extensions can adjust theItem Unit of Measurefilter before weights are recalculated.Location in
UpdateItemUnitOfMeasureWeight()procedure:Event Publisher (add at the end of the codeunit with other events):
File:
Item.Table.alNote
Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.
Tip
Not accurate? Reply with
/not-accurate(optional: add a short explanation). Your feedback improves future responses.JesperSchulz commentedon Sep 3, 2026
The requested change has been implemented in microsoft/BCApps#10903, and the corresponding Azure Boards work item 648438 is resolved as fixed. Closing this issue as completed.
[29.x] Backporting extensibility requests - batch 1751 (#11338)