I have created a codeunit with one method in it. This method does not take any parameter and does not return anything. When I try to use this method on a Form OnActivate event I get the following error during compilation
"When the function is called, the minimum number of parameters should be used "
The method is called by creating a local variable on the form for the Codeunit name and then using it like this.
CodeUnitVarName.methodname();
I am kind of new to navision coding ( 2 days now) so it may be something very simple..
Thanks
GSR
0
Comments
http://www.mibuso.com/forum/viewtopic.php?t=7297
http://www.BiloBeauty.com
http://www.autismspeaks.org
I just checked the code again and by accident I had clicked the parameters tab on the method in the codeunit. The datatype for the line was set to 'Integer' but it had no other field filled ( not even the Name field). And the odd thing is that the codeunit has complied perfectly. Looks like the complier needs some work on it. Anyways I deleted the half filled parameter from the method name and now everything compiles fine.
Thanks
Welcome to Navision.