Li Jun
2022-05-11 b776940205e893302f77d24c4285613f228b44c6
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
<?xml version="1.0" encoding="UTF-8"?>
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>RC_CDS_complete</fullName>
    <availability>online</availability>
    <displayType>button</displayType>
    <linkType>javascript</linkType>
    <masterLabel>OCSM服务本部CDS完毕</masterLabel>
    <openType>onClickJavaScript</openType>
    <protected>false</protected>
    <url>{!RequireScript(&quot;/soap/ajax/51.0/connection.js&quot;)} 
{!RequireScript(&quot;/resource/CommonUtilJs&quot;)} 
//2021-10-21 gwy 版本更改为51.0
if (&apos;{!QIS_Report__c.QIS_Status__c}&apos; == &apos;RC检测申请&apos;) {
    alert(&quot;需要先点击[OCM服务本部收到实物]&quot;);
} else if (&apos;{!QIS_Report__c.CDS_date__c}&apos; != &apos;&apos;) {
    alert(&quot;OCM服务本部CDS已经完毕&quot;);
} else {
var rac = new sforce.SObject(&quot;QIS_Report__c&quot;); 
rac.Id = &quot;{!QIS_Report__c.Id}&quot;; 
var serverTimestamp = sforce.connection.getServerTimestamp(); 
rac.CDS_date__c = serverTimestamp.timestamp; 
rac.RC_CDS_staff__c = &quot;{!$User.Alias__c}&quot;;
var result = sforce.connection.update([rac]); 
var messages = getConnectDMLErrorMessages(result); 
if (messages.length &gt; 0) { 
alert(messages.join(&quot;\n&quot;)); 
location.reload();
}</url>
</WebLink>