What is the maximum parameters are allowed for a function?

bestianhowbestianhow Member Posts: 120
Hi all experts,
Do you know what is the maximum parameters are allowed for a function (NAV2009 Classic)?
I have tried to add up to 50 parameters, it is still allowed me to save & compile.

Thank you.

Comments

  • krikikriki Member, Moderator Posts: 9,110
    It depends on a lot of parameters:
    -type of parameters
    -no. of parameters
    -...
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    I'm not sure. Once there was a limitation on 20 parameters, but I don't know if this is still valid.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • bestianhowbestianhow Member Posts: 120
    I have tried 50 parameters.
    all parameters are Text100
    :P
  • DuikmeesterDuikmeester Member Posts: 304
    What I understand this also depends on the depth of the calling stack...

    So directly calling a function with 50 parameters is not a problem, but when function1 calls function2 calls function3 calls TheSame50Pars will not be possible...
  • bestianhowbestianhow Member Posts: 120
    Maybe i just manage to save & compile.
    I haven't try to calling the function. I will try it later.
    Thanks.
  • SPost29SPost29 Member Posts: 148
    Other issues to consider are:
    Is the function manageable with that many parameters?
    Fifty would generally be considered way, way too many.
    Is Another data structure better ?
    (a temp table?) (Array?)
    Is the function maintainable and understandable?

    Just some thoughts.

    Steve
  • bestianhowbestianhow Member Posts: 120
    Hi Steve,
    Thanks for your reply.
    ASP .net side pass data thru NAV2009 SP1's web service.
    I'm thinking use 1 parameter as 1 field.
    Anyway, some friends recommended me to use XML to handle this case.
    But i don't know how to coding for XML :(


    Thanks.
  • jordi79jordi79 Member Posts: 273
    best to send a temp table as a record variable as a parameter function. or if all the parameters are of the same datatype, then an array variable as a parameter.
Sign In or Register to comment.