<?xml version="1.0" encoding="UTF-8"?>
|
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
|
<fullName>feedbackReport</fullName>
|
<availability>online</availability>
|
<description>反馈按钮</description>
|
<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")}
|
var foo = function() {
|
if('{!Rental_Apply_Fault__c.status__c}' != '已发送'){
|
alert('只有已发送的检测分析报告才能发送');
|
return;
|
}
|
if('{!Rental_Apply_Fault__c.UseExplain__c}' == ''){
|
alert('【备品使用情况说明】不能为空');
|
return;
|
}
|
|
var ra = new sforce.SObject("Rental_Apply_Fault__c");
|
ra.Id = "{!Rental_Apply_Fault__c.Id}";
|
ra.status__c = '已反馈';
|
var result = sforce.connection.update([ra]);
|
var messages = getConnectDMLErrorMessages(result);
|
if (messages.length > 0) {
|
alert(messages.join("\n"));
|
return;
|
}
|
alert("报告已反馈");
|
window.location.reload();
|
}
|
foo();</url>
|
</WebLink>
|