C/AL

From WikiMD's Wellness Encyclopedia

C/AL[edit | edit source]

C/AL (Client/Server Application Language) is a programming language used in Microsoft Dynamics NAV, a business management solution for small and medium-sized enterprises. C/AL is primarily used for developing the business logic of the application, allowing developers to customize and extend the functionality of Dynamics NAV.

History[edit | edit source]

C/AL was introduced with the release of the Navision product, which was later acquired by Microsoft in 2002. The language has evolved over time, with significant updates aligning with new versions of Dynamics NAV. In recent years, C/AL has been gradually replaced by AL, a more modern language used in Microsoft Dynamics 365 Business Central.

Syntax and Structure[edit | edit source]

C/AL is a procedural language that is similar in syntax to Pascal. It is designed to be easy to read and write, with a focus on business logic rather than low-level programming constructs.

Basic Structure[edit | edit source]

A typical C/AL program consists of:

  • Variables: Used to store data values.
  • Functions: Blocks of code that perform specific tasks.
  • Triggers: Special functions that are automatically executed in response to certain events.

Example[edit | edit source]

Below is a simple example of a C/AL function:

```c PROCEDURE CalculateTotal@1(VAR SalesLine@2 : Record 37); VAR

 TotalAmount@3 : Decimal;

BEGIN

 TotalAmount := SalesLine.Quantity * SalesLine.UnitPrice;
 MESSAGE('The total amount is %1', TotalAmount);

END; ```

Development Environment[edit | edit source]

C/AL development is typically done within the C/SIDE (Client/Server Integrated Development Environment), which provides tools for writing, testing, and debugging C/AL code. C/SIDE is integrated into the Dynamics NAV environment, allowing developers to work directly with the application's data and objects.

Transition to AL[edit | edit source]

With the introduction of Microsoft Dynamics 365 Business Central, Microsoft has shifted from C/AL to AL, a language that is more aligned with modern development practices. AL is used in conjunction with the Visual Studio Code editor and offers better integration with source control systems and cloud-based deployment.

See Also[edit | edit source]

References[edit | edit source]

WikiMD
Navigation: Wellness - Encyclopedia - Health topics - Disease Index‏‎ - Drugs - World Directory - Gray's Anatomy - Keto diet - Recipes

Search WikiMD

Ad.Tired of being Overweight? Try W8MD's physician weight loss program.
Semaglutide (Ozempic / Wegovy and Tirzepatide (Mounjaro / Zepbound) available.
Advertise on WikiMD

WikiMD's Wellness Encyclopedia

Let Food Be Thy Medicine
Medicine Thy Food - Hippocrates

Medical Disclaimer: WikiMD is not a substitute for professional medical advice. The information on WikiMD is provided as an information resource only, may be incorrect, outdated or misleading, and is not to be used or relied on for any diagnostic or treatment purposes. Please consult your health care provider before making any healthcare decisions or for guidance about a specific medical condition. WikiMD expressly disclaims responsibility, and shall have no liability, for any damages, loss, injury, or liability whatsoever suffered as a result of your reliance on the information contained in this site. By visiting this site you agree to the foregoing terms and conditions, which may from time to time be changed or supplemented by WikiMD. If you do not agree to the foregoing terms and conditions, you should not enter or use this site. See full disclaimer.
Credits:Most images are courtesy of Wikimedia commons, and templates Wikipedia, licensed under CC BY SA or similar.

Contributors: Prab R. Tumpati, MD