黄千龙
2023-03-08 ca1c0956ec5d16a44bd0a2c10e0e49db37c0fb32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?xml version="1.0" encoding="UTF-8"?>
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>updateFrameNumManag</fullName>
    <availability>online</availability>
    <displayType>button</displayType>
    <linkType>javascript</linkType>
    <masterLabel>关联数据</masterLabel>
    <openType>onClickJavaScript</openType>
    <protected>false</protected>
    <url>{!RequireScript(&quot;/soap/ajax/51.0/connection.js&quot;)}
{!RequireScript(&quot;/soap/ajax/51.0/apex.js&quot;)}
var foo = function() {
    var sId = &apos;{!FrameNumManage__c.Id}&apos;;
    try {
        var rtn = sforce.apex.execute(&quot;SetFrameNumManageWebService&quot;, &quot;updateFrameNumManag&quot;, {Id: sId});
        if (rtn == &apos;1&apos;) {
            alert(&apos;开始执行batch,请等待执行完毕。&apos;);
        } else {
            alert(rtn);
        }
    } catch(e) {
        if (e.faultcode == &apos;sf:INSUFFICIENT_ACCESS&apos;) {
            alert(&apos;没有执行权限。&apos;);
        } else {
            alert(e);
        }
    }
    window.location.reload();
};
foo();</url>
</WebLink>