mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 22:56:55 +01:00
Contributed by CURABIS ApS, generalized from patterns observed across real AppSource/PTE development. Each article follows the knowledge file format (frontmatter, Description/Best Practice/Anti Pattern, sibling .good.al/.bad.al samples).
17 lines
372 B
AL
17 lines
372 B
AL
codeunit 50100 "Customer Lookup"
|
|
{
|
|
procedure GetCustomerName(CustomerNo: Code[20]; var Name: Text[100])
|
|
var
|
|
Customer: Record Customer;
|
|
begin
|
|
if Customer.Get(CustomerNo) then
|
|
Name := Customer.Name;
|
|
end;
|
|
|
|
procedure Sample()
|
|
var
|
|
CustName: Text[100];
|
|
begin
|
|
GetCustomerName('10000', CustName);
|
|
end;
|
|
}
|