Hi,
Reproduction steps:
-
Publish the pageextension below
-
Navigate to item card → Item → Attributes
-
Chose a value for an Item Attribute of type Option
-
Close the page
Expected behaviour:
The value is saved
Actual behaviour:
The value is displayed on the page but not saved after the page is closed
What am I doing wrong?
Thanks
pageextension 50041 ItemAttributeValueList extends "Item Attribute Value List"
{
layout
{
modify(Value)
{
trigger OnLookup(var Text: Text): Boolean
var
Value: Record "Item Attribute Value";
ValuePage: Page "Item Attribute Values";
begin
//Custom logic omitted
Value.SetRange("Attribute ID", Rec."Attribute ID");
Clear(ValuePage);
ValuePage.SetRecord(Value);
ValuePage.SetTableView(Value);
ValuePage.LookupMode := true;
if ValuePage.RunModal() = Action::LookupOK then begin
ValuePage.GetRecord(Value);
Validate(Rec.Value, Value.Value);
CurrPage.Update();
end;
end;
}
}
}