In the context of Powershell and dynamics NAV 2015 there is a function for running codeunits. This provides the Argument parameter. There is no documentation on how to use this parameter or how the used values ββcan be received within the codeunit.
I've tried running the codeunit with an example string, but I can't receive it anywhere in the codeunit. When running the codeunit with the MethodName parameter and arguments, I get the following error:
Invoke-NAVCodeunit : Method 'Codeunit50060.UpdateStatus(number of arguments: 1), with matching argument types.' not found.
At line:2 char:1
+ Invoke-NAVCodeunit -ServerInstance navisiontest -CompanyName d-velop ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (0:Int32) [Invoke-NAVCodeunit], FaultException`1
+ FullyQualifiedErrorId : MicrosoftDynamicsNavServer$navisiontest,Microsoft.Dynamics.Nav.Management.Cmdlets.InvokeNavCodeunit
This is my codeunit: codeunit