Hi,
I'm new to AL Code (Any coding at all), and did manage to make most of my code work, the one thing I'm missing is that I can't wrap my head around how to allow emptying a previously filled field, when doing validation.
When I try to delete the Customer No. in my "Partner No."-field it's not allowed.
Help is much appreciated.
My code for the field:
field(80; "Partner No."; Code[20])
{
Caption = 'Partner no.';
TableRelation = Customer."No.";
trigger OnValidate()
var
Customer: Record Customer;
begin
Customer.Get("Partner No.");
PartnerName := Customer.Name;
end;
}
Error message
