Codeunit definition

As usual, we define all of our business logic in an external codeunit called VendorQualityMgt using the tcodeunit snippet, defined as follows:

codeunit 50102 VendorQualityMgt_PKT{    procedure CalculateVendorRate(var VendorQuality: Record "Vendor Quality_PKT")    var        Handled: Boolean;    begin        OnBeforeCalculateVendorRate(VendorQuality, Handled);        //This is the company's criteria to assign the Vendor rate.        VendorRateCalculation(VendorQuality, Handled);        OnAfterCalculateVendorRate(VendorQuality);    end;    local procedure VendorRateCalculation(var VendorQuality: Record "Vendor Quality_PKT"; var         Handled: Boolean)    begin        if Handled then            exit;        VendorQuality.Rate := (VendorQuality.ScoreDelivery + VendorQuality.ScoreItemQuality + VendorQuality ...

Get Mastering Microsoft Dynamics 365 Business Central now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.