Table of Content
HAL Forum
procedure RecordNew (
record AnyRecord)
Description:
Creates a new record with default values defined in RecordDefaults event.
Parameters:
AnyRecord Record that will receive the new record values (if any default values have been defined through [register_type]RecordDefaults)
global
procedure GetSupplier(string artcode,string location,var record CUVc VEp)
BEGIN
  record PIVc PIr;
  Boolean res;
  
  RecordNew(VEp);
  PIr.ItemCode = artcode;
  PIr.Location = location;
  PIr.DefaultChoice = 1;
  res = ReadFirstKey("DefaultChoice",PIr,3,true);
  if (res) then begin
    VEp.Code = PIr.VECode;
    if (ReadFirstMain(VEp,1,true)) then begin end;
  end;
  if (res==false) then begin
    if (nonblank(location)) then begin
      GetSupplier(artcode,"",VEp);
    end;
  end;
  RETURN;
END;
Related topics:
««