Salesforce 页面弹出窗口打开并显示另一个 URL
在标准帐户布局上,我有一个自定义按钮,可以打开一个带有 Visualforce 页面的新弹出窗口。我的问题是布局页面有一个像 xxx.salesforce.com/xxxxxx 这样的 url,并且弹出页面在像 x.xxx.visual.force.com/ 这样的 url 中打开顶点/我的页面名称 所以我无法访问父窗口,例如使用 window.opener.location.href 重新加载它,我出现错误:访问属性“href”的权限被拒绝。 您知道如何在同一网址中打开弹出窗口吗?
非常感谢。
on the standard account layout i have a custom button that opens a new popup window with a visualforce page. My problem is that the layout page have an url like xxx.salesforce.com/xxxxxx and the popup page opens in url like x.xxx.visual.force.com/apex/myPageName
So i can not access parent window, for example reload it with window.opener.location.href I become an error: Permission denied to access property 'href'.
Do you have an idea how i can open popup in same url?
Many thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Visualforce 页面始终在 Visual.force 域下打开,这是为了阻止嵌入在访问您数据的 Visualforce 页面中的跨站点脚本攻击。
实现您想要的效果的最简单方法是通过创建如下所示的 Visualforce 页面来从 Visual.force 域服务器您的帐户布局
Visualforce pages always open under the visual.force domain this is to stop Cross-Site Scripting attacks being embedded in visualforce pages accessing your data.
The simplest way to achieve what you're after is to server your account layout from the visual.force domain by creating a visualforce page something like the below
我的解决方案是:我使用重定向到 Visualforce 页面(不是弹出窗口)。
My solution was: i used a redirection to the visualforce page (not a popup window).