| <?xml version="1.0" encoding="UTF-8"?> | 
| <WebLink xmlns="http://soap.sforce.com/2006/04/metadata"> | 
|     <fullName>SC_Submit</fullName> | 
|     <availability>online</availability> | 
|     <displayType>button</displayType> | 
|     <linkType>javascript</linkType> | 
|     <masterLabel>提交待审批</masterLabel> | 
|     <openType>onClickJavaScript</openType> | 
|     <protected>false</protected> | 
|     <url>{!RequireScript("/soap/ajax/51.0/connection.js")} | 
| {!RequireScript("/soap/ajax/51.0/apex.js")} | 
| {!RequireScript("/resource/CommonUtilJs")} | 
| //2021-10-21 gwy 版本更改为51.0 | 
| var foo = function() { | 
| var qis_Sc = new sforce.SObject("QIS_SC_Report__c"); | 
| if ('{!QIS_SC_Report__c.Status__c}' != '草案中') { | 
| alert('已经提交审批'); | 
| return; | 
| } | 
|   | 
| if (!confirm("一旦OCM提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) { | 
| return; | 
| } | 
|   | 
| qis_Sc.Id = "{!QIS_SC_Report__c.Id}"; | 
| qis_Sc.Status__c = "已提交"; | 
|   | 
| var result = sforce.connection.update([qis_Sc]); | 
| var messages = getConnectDMLErrorMessages(result); | 
| if (messages.length > 0) { | 
| alert(messages.join("\n")); | 
| return; | 
| } | 
| alert('已提交!') | 
| window.location.reload(); | 
| } | 
| foo();</url> | 
| </WebLink> |