【问题标题】:salesforce lightning $A.get("e.force:createRecord") it's return emptysalesforce 闪电 $A.get("e.force:createRecord") 它返回空
【发布时间】:2018-08-23 07:47:05
【问题描述】:

我尝试过 Salesforce 软件电话。

var createAcountContactEvent = $A.get("e.force:createRecord");
createAcountContactEvent.setParams({
      "entityApiName": "contact",
      "defaultFieldValues": {
            'Phone' : '415-240-6590',
            'Mobile' : '001xxxxxxxxxxxxxxx'
       }
});
createAcountContactEvent.fire();

我已经在我的 salesforce arc 中创建了该组件。如何在 visualforce 页面中使用该组件?

$A.get("e.force:createRecord") // Its return nothing.

如何解决这个问题? 显示如下。

此页面有错误。您可能只需要刷新它。行动 失败:c:MyContactList$controller$createAccount [无法读取属性 'setParams' of undefined] 失败的描述符: {c:MyContactList$controller$createAccount}

【问题讨论】:

  • 你在使用闪电输出吗?我还建议您在 salesforce.stackexchange.com 上发布问题?
  • 是的。使用闪电。

标签: javascript salesforce visualforce salesforce-lightning


【解决方案1】:

当您将其嵌入 VF 页面(使用闪电输出)时,标准闪电将不起作用。您需要明确处理这些操作。您可以参考下面提到的链接以获取更多详细信息。

http://bobbuzzard.blogspot.com/2018/04/toast-message-from-visualforce-page.html https://www.soliantconsulting.com/blog/handle-lightning-events-from-a-visualforce-page/

希望这些信息对您有所帮助!

【讨论】:

  • 不要链接到外部网址,请在答案中添加相关代码和解释。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2022-11-11
  • 2012-12-31
  • 2018-04-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多