【问题标题】:Navigating to back from VisualForce page in SalesForce1从 SalesForce1 中的 VisualForce 页面导航返回
【发布时间】:2016-04-12 19:38:31
【问题描述】:

我已经创建了 VisualForce 页面。我写了一个脚本代码来导航。它在桌面上按预期工作,但在 Salesforce1 iPad 应用程序中却没有。在 Salesforce1 中屏幕为空。

请看下面的代码

if( (typeof sforce != 'undefined') && (sforce != null) ) {
  window.history.back(-1) ;
} else {
  window.location.href = '{!URLFOR($Action.Opportunity.view, Opportunity.Id)}';
}

提前致谢

【问题讨论】:

标签: salesforce visualforce apex


【解决方案1】:

请参考这里:https://developer.salesforce.com/docs/atlas.en-us.salesforce1.meta/salesforce1/salesforce1_dev_jsapi_sforce_one.htm

你可以使用back(​[refresh])函数。

它将导航到保存在 sforce.one 历史记录中的先前状态。相当于点击浏览器的后退按钮。 刷新是可选的。默认情况下,页面不会刷新。如果可能,传递 true 以刷新页面。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-07-03
    • 1970-01-01
    • 2021-06-10
    • 2012-08-12
    • 1970-01-01
    • 2020-02-10
    • 2019-03-10
    相关资源
    最近更新 更多