Search code examples
navdynamics-business-centraldynamics-albusinesscentral

assign value to variable on variable declaration? BC AL


Is it possible to assign a value to a variable on its creation? Something like this:

var ProvisionHeaderCounter: Integer := 1;

Solution

  • No, you can't. If you want to do this you will need to assign the value in the first line of your function.