Li Jun
2022-05-10 51fb56f3f5b0dc96d7f93a71f9b61263e303243f
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
<?xml version="1.0" encoding="UTF-8"?>
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>SIS_to_OPD</fullName>
    <availability>online</availability>
    <displayType>button</displayType>
    <linkType>javascript</linkType>
    <masterLabel>SIS→OPD</masterLabel>
    <openType>onClickJavaScript</openType>
    <protected>false</protected>
    <url>{!RequireScript(&quot;/soap/ajax/51.0/connection.js&quot;)} 
{!RequireScript(&quot;/resource/CommonUtilJs&quot;)} 
//2021-10-22 gwy 版本更改为51.0
 
if(&quot;{!Report__c.OwnerId}&quot; == &quot;{!$User.Id}&quot; &amp;&amp; &quot;{!Report__c.Status__c}&quot; == &quot;草案中&quot;) { 
var rac = new sforce.SObject(&quot;Report__c&quot;); 
rac.Id = &quot;{!Report__c.Id}&quot;; 
rac.RecordTypeId = &quot;01210000000Qekj&quot;; 
 
var result = sforce.connection.update([rac]); 
var messages = getConnectDMLErrorMessages(result); 
if (messages.length &gt; 0) { 
alert(messages.join(&quot;\n&quot;)); 
location.reload(); 
} else { 
alert(&quot;只草案中状态及OPD/SIS报告书的所有人可以提交&quot;); 
}</url>
</WebLink>