OnLoad Event fails with Citrix - InfoPath Dev
in

InfoPath Dev

OnLoad Event fails with Citrix

Last post 03-26-2008 11:09 PM by Soham Bhatt. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 03-25-2008 09:52 PM

    OnLoad Event fails with Citrix

    I have a form that loads the username in one of textboxes - based on the user names it then queries the database to populate the values in a drop down.

    I use the following script in the onload event to get the username:

    Sub XDocument_OnLoad(eventObj)
    Set wscNet = CreateObject("WScript.Network")
    XDocument.DOM.selectSingleNode("/dfs:myFields/my:UserName").text = wscNet.UserName
    End Sub

    The form works fine from the published fileshare location but when i access it via cirtix the the username textbox appears blank - which means the onload event didn't fure up.

    How can i make it work - any ideas?

    Soham Bhatt
  • 03-26-2008 09:01 AM In reply to

    Re: OnLoad Event fails with Citrix

    Citrix might cause some interesting handling. Especially with usernames since it is a terminal session.

    I use an Active Directory webservice, which I know works with Citrix.  It returns the users domain account which they authenticated with as well as gives you access to email, department, manager, phone number, etc that is stored in Active Directory. For remote users without Citrix this allows it to work correctly in VPN scenarios.  It also can be used to lookup other user's information and check group memberships.

    Might be an option for you and give you some other functionality.

    Email me if you would like to see it demonstrated.

     

  • 03-26-2008 10:27 PM In reply to

    Re: OnLoad Event fails with Citrix

    Thanks Clay - Wouldn't mind giving it a go with the web services.

    For some reason i beleive the form/script was working fine with cirtix - might try on click event and see if it could load the user name.

    Any other way you beleive is easier than the web services? Else happy to have your demo

    Soham Bhatt
  • 03-26-2008 10:59 PM In reply to

    Re: OnLoad Event fails with Citrix

    My guess is that it is not the way it is triggered but the compatibility of the code itself with a citrix session and it is not able to get the specific username from the terminal session.

     

  • 03-26-2008 11:09 PM In reply to

    Re: OnLoad Event fails with Citrix

    Hi Clay - you are right as i tried adding the same code to a click event and i got the following message through cirtix (but still works fine locally or when i access the form through server)

    The following error occurred:

    ActiveX component can't create object: 'Wscript.NetWork'
    File:script.vbs
    Line:28

     

    Soham Bhatt
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.