Hi All,
I'm trying to write some code for the following;
I need the field "Qty Per Unit of Measure" from the "Item Unit Of Measure " table to be produced on the Purchase order report.
I created the Table , page and report extension.
The issue I'm having is, If for example the Unit of Measure Code for the Item is "Box", the table extension i created, 'Qty per UoM" doesn't automatically populate that field, i can either select from the drop down, or type it in manually.
It shows on the report just fine. What i need it for this field to be populated once the Unit of Measure is selected and ideally be hidden on the Purchase Order page.
Here's my code - I tried a few triggers but they didn't work so i removed them.
Any help would be greatly appreciated!
tableextension 50128 "Qty Per UoM2" extends "Purchase Line"
{
fields
{
field(50128; "Qty Per UoM2"; Decimal)
{
Caption = 'Qty Per UoM2';
TableRelation = "Item Unit of Measure"."Qty. per Unit of Measure"
where(Code = field("Unit of Measure Code"));
ValidateTableRelation = false;
}
}
}