我们可以通过以下的入口来添加我们自定义的一些Action或者Button,今天会主要写2种我们经常使用的方式:
![](https://img.haomeiwen.com/i11606739/f2ff5515feefd16d.png)
1. Lightning Component
![](https://img.haomeiwen.com/i11606739/f1a14f5febd60681.png)
2. Detail Page Button
这种方式是为了拿到当前Record数据的Id,但这种方式Salesforce是不推荐的,会有安全隐患。
![](https://img.haomeiwen.com/i11606739/da7483e89213bd0b.png)
{!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")}
var leadId = "{!Lead.Id}";
sforce.apex.execute("RunLeadScoreUpdateBatch","execute",{leadId});
setTimeout(function(){
document.location.reload(true);
}, 5000);
网友评论