4

I have an ExactTarget Landing Page form that is currently inserting a Lead into SFDC when submitted. The form has 3 checkbox options that (if possible) I'm trying to concatenate and insert into the 'Description'(textarea) field in SFDC.

Here is the code I have now:

var @_SFtype, @_SFobjid, @checkbox1, @checkbox2, @checkbox3, @Description

SET @checkbox1 = RequestParameter("checkbox1") 
SET @checkbox2 = RequestParameter("checkbox2") 
SET @checkbox3 = RequestParameter("checkbox3") 
SET @Description = Concat(@checkbox1, @checkbox2, @checkbox3)

SET @_SFobjid = CreateSalesforceObject
("Lead",13,"Company",RequestParameter("Company"),
"LastName",RequestParameter("LastName"),
"Status",RequestParameter("Status"),
"FirstName",RequestParameter("FirstName"),
"Job_Title__c",RequestParameter("Job_Title__c"),
"Email",RequestParameter("Email"),
"Phone",RequestParameter("Phone"),
"Street",RequestParameter("Street"),
"City",RequestParameter("City"),
"StateCode",RequestParameter("StateCode"),
"PostalCode",RequestParameter("PostalCode"),
"Description",RequestParameter("Description"),
"LeadSource",RequestParameter("LeadSource"))

if "Lead" == "Contact" then
    SET @_SFtype = "Contact"
endif

if "Lead" == "Lead" then
    SET @_SFtype = "Lead"
endif

I can see when the form posts that it's sending the checkbox values individually and not passing a 'Description' value, but I'm not sure what I'm missing with the script.

SOLVED

Instead of:

"Description",RequestParameter("Description"),

This worked:

"Description",@Description,

  • 1
    I don't see where you're setting @Description in your code. – Adam Spriggs Sep 26 '16 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.