Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

Variable order

Discussion in 'CRM / Helpdesk / App Integration' started by SWSDEV, Mar 17, 2010.

Thread Status:
Not open for further replies.
  1. SWSDEV

    SWSDEV Member

    Joined:
    Feb 23, 2008
    Messages:
    256
    Likes Received:
    0
    When passing in variables to a .net library, how does it determine the order of the variables?

    I have 5 variables in a code component, and I have them in the same order in my vad component and with the same names, but they're getting passed in to the function in a different order.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. SWSDEV

    SWSDEV Member

    Joined:
    Feb 23, 2008
    Messages:
    256
    Likes Received:
    0
    Looks like variables are actually passed in, inreverse order.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    Hi,

    Variables are passed to the library in the same order specified in the configuration of the component. Can you send me the callflow file to review it? I have tested this here and works, so maybe there is something wrong in the configuration...

    Thanks,
     
  4. SWSDEV

    SWSDEV Member

    Joined:
    Feb 23, 2008
    Messages:
    256
    Likes Received:
    0
    What I did was I attached the Visual Studio debugger to the IIS worker process and the variables always came in the opposite order that they were specified in the VAD designer.

    However it only did this for is one component, which is odd.

    I will send you the files so you can take a look.

    Should I just attach it here to a private message?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    Yes, please attach it to a private message, so I can take a look at it.
    Also, can you send me the generated ASPX output for the component? That way I can see if variable order is right in code, or if it has been changed there...
    Thanks.
     
  6. SWSDEV

    SWSDEV Member

    Joined:
    Feb 23, 2008
    Messages:
    256
    Likes Received:
    0
    OK, I will get this to you later this evening.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
  8. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    Hi Shahzad,

    I've been looking at the files you sent me, and doing some testing with the VAD, and it seems that variables are passed to the external component in alphabetical order. This is a bug in the VAD that we'll fix as soon as possible.

    Until we release this fix, something you can do to avoid having this problem is renaming the parameters, for example adding a prefix in alphabetical order ("p01_", "p02_", etc.). This way, parameters will be passed in the order you need.

    Thanks for reporting this error, we'll work on a fix and maybe in a couple of weeks we can release a new version...
     
  9. SWSDEV

    SWSDEV Member

    Joined:
    Feb 23, 2008
    Messages:
    256
    Likes Received:
    0
    Thank you
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.