Calling functions

lubostlubost Member Posts: 632
Is it possible to call functions in codeunits by another way then by name.
I want to create some functions to import data and I want to make a possibility to user to choose the "right" function (for example by number)

Thank you

Comments

  • ClausHamannClausHamann Member Posts: 80
    It is not possible out of the box. You can run a codeunit by referring the number but not functions in the codeunit.

    However you can use the OnRun trigger to achieve you gold. Create a function that sets the function you want to run and use a Case statement on the OnRun trigger to control the function to run.

    Regards

    Claus
  • DenSterDenSter Member Posts: 8,307
    A much easier way to accomplish that (since you're hard coding it anyway) is to display a STRMENU to the user and use the returned value in the CASE statement.
Sign In or Register to comment.