alguidelines/content/docs/BestPractices/named-invocations/index.md
2022-03-26 09:01:43 +01:00

23 lines
462 B
Markdown

---
title: "Named Invocations"
tags: ["AL","Readability"]
categories: ["Best Practice"]
---
_Created by Microsoft, Described by waldo_
## Description
When calling an object statically use the Object Name, not the Object Id.
## <span style="color:FireBrick">Bad code</span>
```al
Page.RunModal(525, SalesShptLine);
```
## <span style="color:ForestGreen">Good code</span>
```al
Page.RunModal(Page::"Posted Sales Shipment Lines", SalesShptLine);
```