Category Archives: C/AL

How to copy a function in Dynamics NAV C/Side

From the Functions list right click on the bar to the right and click copy, select a new blank line, and click paste.

I know, dead simple right? Some times it helps to have these things out there as it’s easy to miss that this is possible in C/Side.

Tagged , ,

Syntax you may not remember in C/AL

Using IN with values from an option field to test whether a field is set to one of the values in a subset of the total options.

IF (Status IN [Status::Open, Status::Authorized, Status::Closed] = TRUE) THEN BEGIN

Keyboard shortcuts that every Dynamics NAV developer should know

A ‘,’ separates items that come in a sequence for instance Alt, F, S would mean press Alt, let go, press F, let go, and finally press S.
A ‘+’ separates keys that are suppose to be pressed at the same time. Alt + D would mean press and hold Alt while pressing D

From the C/AL Editor window

ALT, V, B – Shows the C/AL globals
ALT, V, A – Shows the C/AL locals

From the Object Designer

ALT + D – Design the current object
ALT + R – Run the current object

From either

ALT > F > S to save
CTRL + F to find

Foreach in CAL

So when I go to do this again I will have something to refer back to:

WITH r_RecordVariableName DO BEGIN
  // SetFilters and SetRanges
    UNTIL NEXT = 0;

Tagged ,