Navision automation variable parameter problem

yorecivyoreciv Member Posts: 3
edited 2012-08-30 in Navision Attain
Hello Everyone,

I need your help.
We have a COM object registered for our Navision system.
It has a method that accepts two parameters: The first parameter is a string,
the 2nd parameter is an integer.
However, when I use the following code snippet, it pops up a message box as shown below at compile time


IF ISCLEAR(MyObj) THEN CREATE(MyObj);
_text := "Item Tracking Entry"."Serial No.";
Index := 1;
_returnString := MyObj.DoSth(_text, Index);


Then I changed the second parameter to an integer

IF ISCLEAR(MyObj) THEN CREATE(MyObj);
_text := "Item Tracking Entry"."Serial No.";
_returnString := MyObj.DoSth(_text, 1);

It still gives the same error message.

Could someone give me a hint on this?

Thank you.
1.png 7.2K

Comments

  • kinekine Member Posts: 12,562
    Where the cursor is placed after this error? On which part of your code?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • yorecivyoreciv Member Posts: 3
    kine wrote:
    Where the cursor is placed after this error? On which part of your code?

    The cursor is placed at the second parameter.
    Apparently it needs a reference to a variable.
Sign In or Register to comment.