Google Calendar Embed with merge variables - Can't get this to work

  • 1
  • Question
  • Updated 3 years ago
  • Answered
I started on a "quick and easy" project. I just want to put a google calendar embed in my skuid page but have the calendar display for the current logged in user. I can recreate the embed script exactly but the Iframe displays the salesforce header with an error message. I have tried 3 ways of recreating the embed and all recreate it exactly, but Salesforce will not allow it if it includes any merge variables. Anyone have any ideas on this?
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Can you post the exact embed code / Skuid template merge you're using? 

To disable the SFDC header, try adding &isdtp=mn to your embed url, as described here: https://developer.salesforce.com/forums/?id=906F000000095wbIAA
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
Thanks Zach,
When I use the code that Google generates, the iframe works fine. No Salesforce Header, no error message. When I replace any of the Google code with a merge variable, it seams like salesforce knows and won't let it load. I have tried just replacing the email section, the entire url and the entire embed. I created custom fields on the user object and formatted them the same as what Google does. I confirmed the merges are working correctly. The resulting code is exactly the same as Googles. Here is one example. The first embed is what Google generated. The second embed is where I replace the MyName%40mydomain.com with a merge field {{GoogleCalendarEmailformat}}. The merge is working and the code is identical, but the second one doesn't work.
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
<!-- <iframe src="https://calendar.google.com/calendar/..." style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe> -->

<!-- <iframe src="https://calendar.google.com/calendar/..." style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe> -->
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Make sure you use three braces for the merge, e.g. {{{GoogleCalendarEmailformat}}}
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
Ah... That is probably it. I'll give it a try. Did you ever get around to this?
https://community.skuidify.com/skuid/...
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
That was the problem. I am both excited to have a solution and devastated that I spend an hour troubleshooting it when all I needed was a third pair of mustaches! Thanks for the help. Is there ever a time when you wouldn't want three braces?
Photo of Pablo Martinez

Pablo Martinez

  • 2,468 Points 2k badge 2x thumb
Two braces outputs the value formated (with div's, the references are a link,...)
Three braces just output the raw value of the field
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
I see... Thanks Pablo!