EmailToSalesforce template code issue

  • 1
  • Question
  • Updated 4 years ago
  • Answered
I'm having a bit of an issue with the EmailToSf functionality. 

The main model is title pbaListing and the email address that I'd like to link to is under PropertyOwner model. 


Here's the code:
{{$PropertyOwner.Email.data}}{{#Email}} [<a href="https://mail.google.com/mail/?view=cm&fs=1&tf=1&to={{{Email}}}&bcc=emailtosalesforce...; target="ComposeGmail"><img src="/img/google/gmail_M_icon.gif" alt=""/> Gmail</a>]{{/Email}
Photo of Julien Jacques

Julien Jacques

  • 364 Points 250 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Moshe Karmel

Moshe Karmel, Champion

  • 8,646 Points 5k badge 2x thumb
Maybe try changing the URL to this:

"https://mail.google.com/mail/?view=cm&fs=1&tf=1&to={{{Email}}}&bcc=emailtosalesforce...;

I'm also not sure if you can use this syntax with $Model variables:

{{#$Model.EmailtoSF.data.length}}
{{$Model.EmailtoSF.data.0.EmailDomainName}}
{{/$Model.EmailtoSF.data.length}}

Maybe try and see if it works without the data check like this:

"https://mail.google.com/mail/?view=cm&fs=1&tf=1&to={{{Email}}}&bcc=emailtosalesforce...;
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
A few things. 

I"m not sure what the first merge field is doing:  {{$PropertyOwner.Email.data}}  
And then in the BCC email code you have this:   {{#$Model.EmailtoSF.data}}{{$Model.EmailtoSF.data.0.EmailDomainName}}{{/$Model.EmailtoSF.data}}  I believe it should just be {{#$Model.EmailtoSF.data}}{{EmailDomainName}}{{/$Model.EmailtoSF.data}}

Finally - make sure you have the correct models in your page. 

Follow this tutorial: http://help.skuidify.com/m/supercharge-your-ui/l/102526-including-gmail-to-salesforce-functionality-...
Photo of Julien Jacques

Julien Jacques

  • 364 Points 250 badge 2x thumb
Thanks guys. I've got it working. 
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Glad to hear you got it working.  Its pretty slick!