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