Our organization recently decided to merge two newsletter areas of interest into one (we cover a range of different industry verticals). We use Marketing Cloud data extensions that pull information from our contacts in Salesforce (in this case, a checkbox item for, say, List - Aviation or List - Agriculture) to send newsletters to our members.

So far I've created the new checkbox in Salesforce and set up the Marketing Cloud data extension that pulls that data from SF. The item I'm having trouble with is updating our cloud pages for the footer/preference center. I've basically mimicked the code for the other industry verticals we offer research on, but doing so gives me a 500 error.

Our AMPscript draws up info on our subscribers here:

set @email = RequestParameter('Email Address')
set @firstName = RequestParameter('First Name')
set @lName = RequestParameter('Last Name')
set @memberType = RequestParameter('memberType')
set @subscriberKey = RequestParameter('SubscriberKey')

  set @newsOverview = RequestParameter('newsOverview')
  set @investintheUS = RequestParameter('investintheUS')
  set @chinaNewsHeadlines = RequestParameter('chinaNewsHeadlines')
  set @chinaBusinessReviewNewsletter = RequestParameter('chinaBusinessReviewNewsletter')

if @newsOverview == '' then 
set @newsOverview = false 
if @investintheUS == '' then 
set @investintheUS = false 
if @chinaNewsHeadlines == '' then 
set @chinaNewsHeadlines = false 
if @chinaBusinessReviewNewsletter == '' then 
set @chinaBusinessReviewNewsletter = false 

if @memberType == 'Member' Then
  set @agricultureAndFoodSafety = RequestParameter('agricultureAndFoodSafety')
  set @automative = RequestParameter('automative')
  set @aviation = RequestParameter('aviation')
  set @beltAndRoadInitiative = RequestParameter('beltAndRoadInitiative')
  set @eCommerce = RequestParameter('eCommerce')
  set @energyAndEnvironment = RequestParameter('energyAndEnvironment')
  set @financialServices = RequestParameter('financialServices')
  set @healthcare = RequestParameter('healthcare')
  set @infoAndCommTechnology = RequestParameter('infoAndCommTechnology')
  set @intellectualPropertyRights = RequestParameter('intellectualPropertyRights')
  set @mediaPublishingEntertainment = RequestParameter('mediaPublishingEntertainment')
  set @standards = RequestParameter('standards')
  set @chinaMarketIntelligence = RequestParameter('chinaMarketIntelligence')
  set @washingtonUpdate = RequestParameter('washingtonUpdate')
  set @meetingsAndEvents = RequestParameter('meetingsAndEvents')

Then, further down (skipping over some CSS stuff, etc.) we have the actual script that updates the contact's information in Salesforce that look like this:

set @result = UpdateSingleSalesforceObject('Contact',@subscriberKey,

Now I may just be making a serious rookie mistake here, but adding the new list in here, using the same layout and format as the other industries' AMPscript just yields a 500 error every time. The new list we're adding in is called Transportation, so in essence, what I've tried, in the respective places is:

  set @transportation = RequestParameter('transportation')

and then:


Am I doing something exceptionally silly, like needing to set an ID in Salesforce for the new list before adding it to the Marketing Cloud cloud page? I'll note that the List_Transportation__c is the correct API name for the new list in Salesforce. I apologize for what might be a silly question, but I'm stuck on it and would appreciate any input or direction to resources!

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.