Hi there
I have a really tricky task to try and complete.
I have been handed an application to build an integration from the CF
application to a CRM application.
Basically here is what I am trying to do
Basically I have a form which has been created
Collects data from a user - namely First Name, Postcode, Email Address,
Favourite Hair Colour with four possible selections, and also a check box - Do
you like icecream (yep I know very complicate.
I want to capture this information and integrate the answers with the CRM.
I have some sample code (from .Net I think but have no idea what it is trying
to do.
Hoping someone might be able to shed some light onto how I convert the .Net
code to CF.
Here is the code below:
Imports Traction.Integration
Imports Traction.Integration.DataObjects
Imports Traction.Integration.Result
Imports Traction.Integration.TractionTypes.CustomerAttributes
Imports Traction.Integration.TractionTypes.CustomerAttributes.Default
Imports Traction.Integration.Result.Errors
....
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
'instantiate a new SurveyDataObject using the web.config configuration
"MySurvey1"
Dim SurveyResponse As New SurveyDataObject("MySurvey1")
With SurveyResponse
'customer details
With .Customer
'default attributes
.FirstName.Value = txtFirstName.Text
.Email.Value = txtEmail.Text
'custom attributes are pre-defined in the web.config
configuration;
'in this case there is only one custom attribute (postcode),
which is a text attribute
CType(.CustomAttributes(0), TextCustomerAttribute).Value =
txtPostcode.Text
'validate and handle any errors before posting to Traction
If .Validate.Length > 0 Then
'pre-post error handling if the Validate method returns any
errors
End If
End With
'match key is email
.MatchKey =
TractionTypes.Enumerations.Traction_MatchKeyEnumeration.E
.MatchValue = txtEmail.Text
'survey responses:
'list boxes and dropdown boxes should return the sequential option
number per Traction,
'not the option text
.Questions(0).Answer = lbxHairColour.SelectedValue 'e.g. "2", not
"Brunette"
'check boxes should return the string representation of the Checked
boolean property
.Questions(1).Answer = cbxIceCream.Checked.ToString 'e.g. "True"
End With
'perform the post
Dim MyResult As SurveyResult = Post.SurveyPost(SurveyResponse)
'examine the result
If MyResult.Success Then
lblResult.Text = "Thanks for entering!"
Else
'handle error conditions
End If
End Sub
Thanking anyone who replies.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314284
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4