December 2019
Beginner to intermediate
770 pages
16h 14m
English
Have a look at the implementation of SetLookupValueOnCustomer:
local procedure SetCustomerCategoryOnCustomer( var Customer: record Customer; CustomerCategoryCode: Code[10])begin with Customer do begin Validate( "Customer Category Code_PKT", CustomerCategoryCode); Modify(); end;end;
Calling Validate is essential here. SetLookupValueOnCustomer is not just about assigning a value to the Customer Category Code_PKT field, but also about making sure it is validated against existing values in the Customer Category table. Note that the OnValidate trigger of the Customer Category Code_PKT field does not contain code.
Read now
Unlock full access