Send multiple arguments from POWERSHELL to NAV??

ArturoArturo Member Posts: 30
edited 2015-01-09 in NAV Three Tier
Hello,
Anyone knows how to do this? I tried with arrays, comma separated values, etc but there is no way.

Invoke-NAVCodeunit -CodeunitId 700000 -ServerInstance DynamicsNAV71 -CompanyName $Comp.CompanyName -methodname 'Mynavfunciton' -Argument $Myarray
Invoke-NAVCodeunit -CodeunitId 700000 -ServerInstance DynamicsNAV71 -CompanyName $Comp.CompanyName -methodname 'Mynavfunciton' -Argument 'value1','value2','value3'
Invoke-NAVCodeunit -CodeunitId 700000 -ServerInstance DynamicsNAV71 -CompanyName $Comp.CompanyName -methodname 'Mynavfunciton' -Argument 'value1' -Argument 'value2'...
Thanks.

Comments

  • JasminkaTJasminkaT Member, Microsoft Employee Posts: 34
    By default, the OnRun trigger is called, but you can specify a different method name and pass it an optional string argument.

    So you can alternatively format your arguments as comma (or whatever else fits) separated string, and handle that string in Method first.
  • ArturoArturo Member Posts: 30
    Hi!
    Thanks for your answer, i think im gonna try what you tell me, anyway, i expected Powershell could do that.
    regards.
Sign In or Register to comment.