First pass conversion of NAV Patterns
This commit is contained in:
parent
1341938262
commit
6b32107a72
325 changed files with 11946 additions and 0 deletions
21
content/NAVPatterns/static-object-invocation/index.md
Normal file
21
content/NAVPatterns/static-object-invocation/index.md
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
+++
|
||||
title = "static-object-invocation.md"
|
||||
weight = 1160
|
||||
+++
|
||||
Call objects statically whenever possible. It reduces extra noise and removes extra variables. Downside: changing the name of the object which is called statically will need a code update.
|
||||
|
||||
Bad code
|
||||
|
||||
LOCAL PROCEDURE Code@1();
|
||||
VAR
|
||||
CAJnlPostBatch@1001 : Codeunit 1103;
|
||||
BEGIN
|
||||
CAJnlPostBatch.Run(CostJnlLine);
|
||||
END;
|
||||
|
||||
Good code
|
||||
|
||||
LOCAL PROCEDURE Code@1();
|
||||
BEGIN
|
||||
CODEUNIT.RUN(CODEUNIT::"CA Jnl.-Post Batch",CostJnlLine);
|
||||
END;
|
||||
Loading…
Add table
Add a link
Reference in a new issue