Dear All.
Am trying to make unit of measure mandatory in the purchase line but it's not working. Below is my AL code.
Modify("Unit of Measure")
{
trigger OnAfterValidate()
begin
//If (Rec."Unit of Measure" = '') then
TESTFIELD("Unit of Measure");
//Error('The Unit of Measure cannot be empty.');
end;
}