Li Jun
2022-04-13 5c01ebbfddb6b8674430b47c22977bea2e350084
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
<?xml version="1.0" encoding="UTF-8"?>
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>refresh_status</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;)}
//2021-10-22 gwy 版本更改为51.0
var eSet = &apos;{!Equipment_Set__c.Id}&apos;;
try {
    var rtn = sforce.apex.execute(&quot;RentalApplyWebService&quot;, &quot;eSetRefreshStatus&quot;, {eSetId: eSet});
    if (rtn = &apos;1&apos;) {
        alert(&quot;状态更新完毕!&quot;);
        location.href = &quot;/{!URLENCODE(Equipment_Set__c.Id)}&quot;; 
    } else {
        alert(rtn);
    }
} catch(e) {
    alert(e);
}</url>
</WebLink>