<?xml version="1.0" encoding="UTF-8"?>
|
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
|
<fullName>OCSMToReport</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("/soap/ajax/51.0/apex.js")};
|
{!RequireScript("/resource/CommonUtilJs")}
|
//2021-10-21 gwy 版本更改为51.0
|
var foo = function() {
|
if (!confirm("报告后无法撤回,是否继续?")) {
|
return;
|
}
|
if("{!QIS_Report__c.OCSMAdministrativeReportStatus__c}" == "" &&
|
"{!QIS_Report__c.Aware_date__c}" != "" ){
|
var updateRe = new sforce.SObject("QIS_Report__c");
|
updateRe.id = "{!QIS_Report__c.Id}";
|
updateRe.OCSMAdministrativeReportStatus__c = '待报告';
|
var result = sforce.connection.update([updateRe]);
|
var messages = getConnectDMLErrorMessages(result);
|
if (messages.length > 0) {
|
alert(messages.join("\n"));
|
return;
|
}
|
window.location.reload();
|
}else{
|
alert("没有AwareDate或已经OCSM行政报告,请确认。");
|
return;
|
}
|
};
|
foo();</url>
|
</WebLink>
|