1

So when I am previewing and testing ampscript in an email it is rendering fine, the name shows up. But when I get the email the name field is blank.

Hi %%=Propercase(@FirstName)=%%, %%[var @FirstName set @FirstName = [Opportunity:Primary_Contact__r:FirstName]]%%
1

This is an order of operations issue, you need to set the VAR before you call it

%%[var @FirstName set @FirstName = [Opportunity:Primary_Contact__r:FirstName]]%%

Hi %%=Propercase(@FirstName)=%%,
|improve this answer|||||
  • Okay, sorry I'm brand new to ampscript. Can I just copy and paste the solution you gave me? – dindymolan Apr 30 '19 at 21:06
  • Based on your example code that should be accurate. You can also simply do a personalization string %%=Propercase(Opportunity:Primary_Contact__r:FirstName)=%% I would also start with 101 here: developer.salesforce.com/docs/… – EazyE May 1 '19 at 1:24
  • Thank you! This worked. – dindymolan May 1 '19 at 15:17

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.