Why do you need this change?
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
Why do you need this change?
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.
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