SET @emailaddress = QueryParameter("email") /* gets the encrypted string */) SET @thanks = QueryParameter("thanks") set @Contact = RetrieveSalesforceObjects("Contact","Id,FirstName,MobilePhone,LastName,Preferred_Business_Email_Address__c,Fund_Overview_Webcasts__c,BDC_FA__c,Global_REIT_II_Communication__c,Fund_Updates_or_News__c,Marketing_Materials__c,Individual_Communications__c,SMS_Message_Opt_In__c,Preferred_First_Name__c,Preferred_Last_Name__c,ISC_Name__c,ISC_Email__c,ISC_Phone__c,ISC_Title__c,Contact_Owner_Name__c,Contact_Owner_Email__c,Contact_Owner_Phone__c,Contact_Owner_Title__c,Preferred_Broker_Dealer_Name__c,Broker_Dealer_Name__c,Email,HasOptedOutOfEmail","Email", "=", v(@emailaddress)) Set @ContactRow = ROW(@Contact,1)
I am building a landing page in MC that will display a persons information based on the information they have in SF, they will be able to submit a form and update their preference (its a preference center).
I am using the url to populate their email address and use that to query back to SF for the right contact. (example: testsite.com/Mainemail@example.com)
My problem is if a user somehow gets to this page through other means or they don't have a record in SF but they do in MC they will either get a really ugly error message or the LP will go and find the first contact in SF and display that..
So I need a way for my code to tell me they aren't in there then redirect them.
set @rowCount = rowcount(@ContactRow) IF @rowCount > 0 THEN
I've seen something like this done before but i've only got it to work with a row pull from a Data Extension.
Has anyone solved this before?