张宇恒
2022-03-18 d2ef556f29fee3925f06221bba078dcbb8f85c0b
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
<?xml version="1.0" encoding="UTF-8"?>
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>SI_Copy_Custom</fullName>
    <availability>online</availability>
    <displayType>button</displayType>
    <linkType>javascript</linkType>
    <masterLabel>复制SI需求表(Old)</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;)} 
{!RequireScript(&quot;/resource/CommonUtilJs&quot;)} 
//2021-10-21 gwy 版本更改为51.0
sforce.connection.sessionId = &quot;{!GETSESSIONID()}&quot;; 
var ids = &apos;{!IS_Opportunity_Demand__c.Id}&apos;; 
var rtn = &apos;&apos;;
try{ 
rtn = sforce.apex.execute(&quot;ControllerUtil&quot;, &quot;ISO_Copy_Func&quot;, {isoID:ids}); 
if(rtn==&apos;存在未终止的SI需求表,不能复制&apos;){ 
alert(rtn); 
}else{ 
var url = &quot;apex/ISO_DemandOperAndDemons?id=&quot;+rtn; 
//window.top.location.reload(); 
window.top.location.href=url; 
}catch(e){ 
alert(e); 
}</url>
</WebLink>