2021-07-07 New Action to Update
2021-07-08 本文已影响0人
古月的小七
我们可以通过以下的入口来添加我们自定义的一些Action或者Button,今天会主要写2种我们经常使用的方式:

1. Lightning Component

2. Detail Page Button
这种方式是为了拿到当前Record数据的Id,但这种方式Salesforce是不推荐的,会有安全隐患。

{!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);