+ Start a Discussion

Processing Fails when VF Page in Iframe, Fine when stand-alone


I am having a really weird error, and any help would be appreciated. I worte a visualforce page with a custom controller that inserts a lead and a campaign member record. This works perfectly when I navigate directly to the page. However, when I embed it as an iframe in my external site, I get a INVALID_CROSS_REFERENCE_KEY error on processing.

Does anyone have any idea why this would happen?


Just in case anyone has a similar error, it was from javascript - I was referencing top.location in my iframe and javascript prevented that for security reasons. That prevented the rest of the javascript from executing, which in turn made some of my form values illegal.