4

We're a consulting agency and work with a large number of salesforce customers. We developed a simple visualforce sidebar component that we are trying to load into all of our customers instances to allow them to easily contact us for support.

The issue we are having is that one of our customers the visualforce iframe in the sidebar is being rendered from force.com while the rest are just served using relative urls (so would be served from salesforce.com)

<iframe frameborder="no" height="0px" id="066F0000002GTYI" marginheight="0" marginwidth="0" name="066F0000002GTYI" scrolling="no"
src="https://tjwf--c.na10.visual.force.com/apex/Intercom?autoMapValues=1&amp;inline=1&amp;core.apexpages.framework.ApexViewServlet.getInlinedContentRequest=1&amp;sfdcIFrameOrigin=https://tjwf.my.salesforce.com/home/home.jsp&amp;sdfcIFrameOrigin=https://tjwf.my.salesforce.com/home/home.jsp"
title="Intercom" width="100%"></iframe>

And the same homepage component page on another clients looks like this

<iframe frameborder="no" height="0px" id="066d0000002EmhU" marginheight="0" marginwidth="0" name="066d0000002EmhU" scrolling="no"
src="/apex/Intercom?autoMapValues=1&amp;inline=1&amp;core.apexpages.framework.ApexViewServlet.getInlinedContentRequest=1&amp;sfdcIFrameOrigin=https://na14.salesforce.com/003/o&amp;sdfcIFrameOrigin=https://na14.salesforce.com/003/o"
title="Intercom" width="100%"></iframe>

note that the important difference here is the SRC property for one of them starts with src="https://tjwf--c.na10.visual.force.com" wile the other is simply src="/apex"

They are both setup exactly the same as visualforce "homepage components". Any ideas why this is different?

UPDATE:

It was suggested that it migth be related to "my domain" being turned on but we have another client who also has that turned on and there iFrame still has a relative url?

See full iframe below

<iframe frameborder="no" height="0px" id="066U0000000xZ7Q" marginheight="0" marginwidth="0" name="066U0000000xZ7Q" scrolling="no" 
src="/apex/Intercom?autoMapValues=1&amp;inline=1&amp;core.apexpages.framework.ApexViewServlet.getInlinedContentRequest=1&amp;sfdcIFrameOrigin=https://posse.my.salesforce.com/home/home.jsp&amp;sdfcIFrameOrigin=https://posse.my.salesforce.com/home/home.jsp" 
title="Intercom" width="100%"></iframe>

UPDATE 2

So thanks to bigassforce for taking the time to look at my setup. No solutions to why the iframe would serve differently but I did find an even better work around.

I was able to pass user and org data into the javascript via query parameter and get the functionality I needed for my intercom plugin by passing like this

{!REQUIRESCRIPT("/resource/Intercom"+"?email="+$User.Email+"&name="+$User.FirstName+" "+ $User.LastName+"&company="+$Organization.Name+"&orgId="+Organization.Id+"&appId=YOURAPPIDHERE")}

So i was able to bypass my need to read data from the viusalforce iframe all together. the You can the the steps and the plugin code here: https://github.com/familiar-studio/salesforce-intercom

BUT, the larger question still stands, why would the homepage component behave differently in the two different orgs?

5
  • Yea my js isn't able to read the data in the iFrame in the one with the full url but the other one works fine – Keith Mancuso Dec 15 '14 at 3:03
  • But we have 10 customers, 9 of them work, only this one doesn't – Keith Mancuso Dec 15 '14 at 3:04
  • Gotomeeting? I can do a join.me if that works? Http://join.me/familiar-studio – Keith Mancuso Dec 15 '14 at 3:09
  • Got to look at the orgs involved over a screen share meeting. The Session Settings are identical and Static Resource Critical Update setting was identical. Yet they generate different iframe markup. Interesting! – bigassforce Dec 15 '14 at 3:44
  • Any differences in critical updates activated? – Daniel Hoechst May 11 '15 at 4:16
0

Maybe because they have a my domain setup. As the differences maybe appearing due to that.

1
  • I thought that at first but no, i have another client also with my domain and it works for them. This is their sidebar iframe: <iframe frameborder="no" height="0px" id="066U0000000xZ7Q" marginheight="0" marginwidth="0" name="066U0000000xZ7Q" scrolling="no" src="/apex/Intercom?autoMapValues=1&amp;inline=1&amp;core.apexpages.framework.ApexViewServlet.getInlinedContentRequest=1&amp;sfdcIFrameOrigin=posse.my.salesforce.com/home/…" title="Intercom" width="100%"></iframe> – Keith Mancuso Dec 15 '14 at 0:25
0

Try checking SETUP | SESSION SETTINGS in both orgs, check if the clickjack settings are different

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.