Draft:AL (programming language)
Submission declined on 28 October 2024 by LR.127 (talk). This submission is not adequately supported by reliable sources. Reliable sources are required so that information can be verified. If you need help with referencing, please see Referencing for beginners and Citing sources.
Where to get help
How to improve a draft
You can also browse Wikipedia:Featured articles and Wikipedia:Good articles to find examples of Wikipedia's best writing on topics similar to your proposed article. Improving your odds of a speedy review To improve your odds of a faster review, tag your draft with relevant WikiProject tags using the button below. This will let reviewers know a new draft has been submitted in their area of interest. For instance, if you wrote about a female astronomer, you would want to add the Biography, Astronomy, and Women scientists tags. Editor resources
|
Submission declined on 21 May 2024 by SL93 (talk). This draft's references do not show that the subject qualifies for a Wikipedia article. In summary, the draft needs multiple published sources that are: Declined by SL93 7 months ago.
|
Submission declined on 28 April 2024 by Stuartyeates (talk). This draft's references do not show that the subject qualifies for a Wikipedia article. In summary, the draft needs multiple published sources that are: Declined by Stuartyeates 8 months ago.
|
- Comment: Most of the sources are user-generated or blog posts. LR.127 (talk) 02:04, 28 October 2024 (UTC)
- Comment: Three of the four sources are definitely primary and the last is close. We need in depth coverage in independent secondary sources. Stuartyeates (talk) 08:28, 28 April 2024 (UTC)
AL (programming language)
[edit]AL is the programming language for Microsoft Dynamics 365 Business Central, which marks the inclusion of the former Microsoft Dynamics Navision as ERP software into the Microsoft 365 environment. With this change AL replaces the C/AL programming language as programming language for the newer versions of the software.[1][2]
Differences to C/AL
[edit]AL is being written in visual studio code instead of C/SIDE (Client/Server Integrated Development Environement), which is also what the C in C/AL stands for. The launch conditions to apply changes to the software are set in JSON format.
Other differences include:
- Procedure overload[3]
- Page extension objects to add to objects outside editing permission
- Protected variables have been added[4]
- Polymorphic functions[5]
Examples
[edit]Hello World
[edit]This is the classic Hello World example. Like C/AL the AL language despite being written in Visual Studio Code does not use the console output, therefor this example uses the dialog box.
MESSAGE('hello, world!');
Functions and filtering records
[edit]Variables are defined in the code in front of the function as local or at the bottom of an object as global variables.
local procedure getCustomer(value : Integer) : Text
var
customer record: customer
begin
customer.SETFILTER("ID",value);
IF customer.FINDFIRST then
exit(format(customer.name));
end;
Looping and data manipulation
[edit]Going over reasonably large sets of data to edit them in code is achieved with only a few lines of code.
Item.RESET;
Item.SETFILTER("order date",'%1..%2',010123D,311223D);
IF Item.FINDSET THEN
REPEAT
IF Item."Weight In Kg" > 20 THEN BEGIN
Item."shipment price" := Item."shipment price" * 1.2;
Item.MODIFY(TRUE);
END;
UNTIL Item.NEXT = 0;
Item.MODIFYALL();
See also
[edit]References
[edit]- ^ Brummel, Marije; Studebaker, David; Studebaker, Chris (2019). Programming Microsoft Dynamics 365 Business Central. Packt Publishing. pp. 5, 25. ISBN 978-1-78913-779-8. Archived from the original on 29 April 2024. Retrieved 2024-04-29 – via Google Books.
- ^ "The new development experience for Microsoft Dynamics 365 Business Central: Making things worse?". MSDynamicsWorld.com. 2019-05-14. Retrieved 2024-04-27.
- ^ SusanneWindfeldPedersen (2022-02-15). "Procedure overload - Business Central". learn.microsoft.com. Retrieved 2024-04-27.
- ^ "cmty_blog_detail". community.dynamics.com. Retrieved 2024-04-27.
- ^ "Template Method Pattern". alguidelines.dev - Business Central Design Patterns. Retrieved 2024-10-27.