Using the AL Keyword in Microsoft Dynamics Business Central On Premises
If you’re new to Microsoft Dynamics Business Central on premises, you need to know how to easily customize it. This blog provides step-by-step instructions on how to use AL Keywords in a code unit in Microsoft Dynamics 365 Business Central. In this blog, you’ll learn how to do customizations using MAXSTRLEN keywords.
- Open Visual Studio.
- Create a Code unit for the MAXSTRLEN Keyword.
MAXSTRLEN Keyword is used to get the maximum defined length of a string variable.
Syntax: Max: = MAXSTRLEN(String)
Figure 1 – Creating a code unit for the MAXSTRLEN Keyword in Dynamics Business Central
- Create a page extension.
Figure 2 – Creating a page extension for the MAXSTRLEN Keyword in Dynamics Business Central
- Click F5 or click on View, then Click on >AL: Publish. The vendor page will open; go to Navigate -> vendor-> MaxstrlenAction(Action name).
Figure 3 – An action is added after Bank Accounts and the name of the action is MaxstrlenAction in Dynamics Business Central
- Final Output:
Figure 4 – Output of the MAXSTRLEN Keyword in Dynamics Business Central
For a more general discussion of using AL keywords for Microsoft Dynamics 365 Business Central customization, see the post How to: Customize Microsoft Dynamics Business Central On Premises Using AL Keywords.
If you have any questions about this or other Dynamics NAV or Business Central questions for any version, contact ArcherPoint.
Read more “How To” blogs from ArcherPoint for practical advice on using Microsoft Dynamics Business Central or NAV.
If you are interested in NAV/Business Central development, check out our collection of NAV/BC Development Blogs.