mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-07 23:56:56 +01:00
Preserve business filters when recommending Record.Get
This commit is contained in:
parent
fd59919778
commit
34424c390c
4 changed files with 44 additions and 5 deletions
|
|
@ -7,4 +7,25 @@ codeunit 50210 "Perf Sample GetByPK Good"
|
|||
if Customer.Get(CustomerNo) then
|
||||
Message(Customer.Name);
|
||||
end;
|
||||
|
||||
procedure ShowUnblockedName(CustomerNo: Code[20])
|
||||
var
|
||||
Customer: Record Customer;
|
||||
begin
|
||||
Customer.SetRange("No.", CustomerNo);
|
||||
Customer.SetRange(Blocked, Customer.Blocked::" ");
|
||||
if Customer.FindFirst() then
|
||||
Message(Customer.Name);
|
||||
end;
|
||||
|
||||
procedure ShowUnblockedNameByKey(CustomerNo: Code[20])
|
||||
var
|
||||
Customer: Record Customer;
|
||||
begin
|
||||
if not Customer.Get(CustomerNo) then
|
||||
exit;
|
||||
if Customer.Blocked <> Customer.Blocked::" " then
|
||||
exit;
|
||||
Message(Customer.Name);
|
||||
end;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue