...answers when you need them
866-430-8274    1-617-715-9605
  • Free Version
  • Contact Us
  • Login

Checkbox Forums

Register | Help
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    leeg32 Guest

    Default Sending an Invitation for a Survey

    Hey, I'm currently working on a vb.net page where I want to do the following through the webservice/API.:

    1. Confirm if a user exists. If he exists, then get the details for the user (guidUserID).
    2. If the user doesn't exist, create the user and get the details stored along with the guidUserID.
    3. Finally, fire off an invitation to the existing or newly created user for a particular survery. The survey will have already been created using the Checkbox Survey Server web pages in advance.

    For steps 1 and 2, I believe I'm pretty much there using the webservice. It's when I get to step 3 where I'm bogging down. I know there is an older example of doing this from another post. That post is written in C# and doesn't appear to be using the webservice. I'm unable to get valid references for that other code to work correctly. Here's what I have below in regards to my code. Thoughts on the solution anyone?

    Dim objInvitation As Checkbox.Web.Services.InvitationManagement
    Dim guidUserToken As Guid
    Dim guidUserID As Guid
    Dim test As String()
    Dim value As String
    Dim profileProps As New List(Of SimpleNameValue(Of Object, Object))()
    Dim profile As SimpleNameValue(Of Object, Object)()
    Dim strCurrentEmail As String



    wsProxy.Url = "http://localhost/checkbox/services/usermanagementservice.asmx"

    guidUserToken = wsProxy.AuthenticateUser("admin", "admin")

    If guidUserToken <> Guid.Empty Then
    'test = wsProxy.GetUserIdentities(guidUserToken, "UserName", "TestUser")
    'Response.Write(test(0))
    'Create the profile for the new user


    profileProps.Add(New SimpleNameValue(Of Object, Object)("FirstName", "Test"))
    profileProps.Add(New SimpleNameValue(Of Object, Object)("LastName", "Test"))
    profileProps.Add(New SimpleNameValue(Of Object, Object)("Email", "test@domain.com"))
    'Create the user
    wsProxy.CreateUser(guidUserToken, "Test", "password", profileProps.ToArray(), True)

    profile = wsProxy.GetUserProfile(guidUserToken, "Test")

    'Find the "LastName" property and update it
    For Each profileProp As SimpleNameValue(Of Object, Object) In profile

    'Response.Write("Name: " & profileProp.Name.ToString() & " ")
    'Response.Write("Value: " & profileProp.Value.ToString & "
    ")

    If DirectCast(profileProp.Name, String) = "Email" Then
    strCurrentEmail = profileProp.Value.ToString()
    Response.Write(strCurrentEmail)

    End If
    Next
    End If

    'this is the point where I would need code for firing off a survey
    objInvitation.AddUsersToInvitation(

    end sub

  2. #2
    pwiesner is offline Administrator
    Join Date
    Mar 2007
    Posts
    382

    Default

    The example for sending an invitation does not use WebServices because at this time there is no WebService for invitation management. The invitation WebService is scheduled to be released with Checkbox 4.5, which we hope to have out in the next month or two.

    At this time the only way to send an invitation is using the API. An example of how to accomplish this is outlined in the forum post you mentioned.

  3. #3
    leeg32 Guest

    Default

    I'm unable to access the following when trying to establish references based on the other post. Which dll should I be using in order to access this? Is it checkbox.dll or does it involve others as well?


    Imports Checkbox.Users
    Imports Checkbox.Forms
    Imports Checkbox.Panels
    Imports Checkbox.Security
    Imports Checkbox.Invitations
    Imports Checkbox.Messaging.Email

    ....
    I figured this out. I added the checkbox.dll which also adds several other dependency dlls. The import statements are now good. However, there seems to be issues with the conversion from C# to vb.net. I'll post those issues in the original thread from July.
    Last edited by leeg32; 03-05-2008 at 01:59 PM. Reason: found dll.

  4. #4
    pwiesner is offline Administrator
    Join Date
    Mar 2007
    Posts
    382

    Default

    You will need to add a reference to the Checkbox.dll. You may want to add Checkbox.Common.dll, Prezza.Framework.dll and Prezza.Framework.Common.dll as well.

    I apologize for the redundant response. I only receive an email notification for new posts not edits.
    Last edited by pwiesner; 03-05-2008 at 02:19 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Feedback

SEO by vBSEO 3.5.0