| <?xml version="1.0" encoding="UTF-8"?> | 
| <WebLink xmlns="http://soap.sforce.com/2006/04/metadata"> | 
|     <fullName>SubmitAndRefresh</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")} | 
| function foo(){ | 
| if ('{!Account_Delay_Apply__c.Is_upload_file__c}' == '0') { | 
| alert('请上传客户变更申请信息附件'); | 
| return; | 
| } | 
| var accname='{!Account_Delay_Apply__c.HospitalName__c}'.substr(-2,2); | 
| if((accname =='公司' || accname =='集团') && '{!Account_Delay_Apply__c.Attribute_Type__c}' !='企业集团'){ | 
| alert('客户为公司或集团,医院性质不是企业集团,请核实医院性质,确认是否提交?'); | 
| } | 
| if (!confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) { | 
| return; | 
| } | 
| var request = new sforce.ProcessSubmitRequest(); | 
| request.objectId = "{!Account_Delay_Apply__c.Id}"; | 
| var processResults = sforce.connection.process([request]); | 
| if (processResults[0].errors != null) { | 
| var errmsg = processResults[0].errors.message.toString(); | 
| alert(errmsg); | 
| return; | 
| }else{ | 
|   | 
| } | 
| window.location.reload(); | 
| }; | 
| foo();</url> | 
| </WebLink> |