| <?xml version="1.0" encoding="UTF-8"?> | 
| <WebLink xmlns="http://soap.sforce.com/2006/04/metadata"> | 
|     <fullName>QISAgree</fullName> | 
|     <availability>online</availability> | 
|     <displayType>button</displayType> | 
|     <linkType>javascript</linkType> | 
|     <masterLabel>QIS结果跟进完毕</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.OwnerId}" == "{!$User.Id}") { | 
| var rac = new sforce.SObject("QIS_Report__c"); | 
| rac.Id = "{!QIS_Report__c.Id}"; | 
| rac.QIS_Status__c = "完毕"; | 
| // 4.OSH回答完毕 ==> 9.Final 完毕 | 
| if ("{!QIS_Report__c.RecordTypeId}" == "01210000000RLgY") { | 
|     rac.RecordTypeId = "01210000000gFTH"; | 
| } | 
| // 3.OSH ==> 5.完毕 | 
| else { | 
|     rac.RecordTypeId = "01210000000RLcW"; | 
| } | 
| var serverTimestamp = sforce.connection.getServerTimestamp();  | 
| rac.QIS_Complete_Day__c = serverTimestamp.timestamp;  | 
|   | 
| var result = sforce.connection.update([rac]); | 
| var messages = getConnectDMLErrorMessages(result); | 
| if (messages.length > 0) { | 
|     alert(messages.join("\n")); | 
| } | 
| location.reload(); | 
| } else { | 
| alert("只有所有者可以按QIS结果跟进完毕的按钮"); | 
| }</url> | 
| </WebLink> |