<?xml version="1.0" encoding="UTF-8"?>
|
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
|
<fullName>RepairRenew</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")}
|
|
var buttons = document.getElementsByName('RepairRenew');
|
for (var i=0; i<buttons.length; i++) {
|
buttons[i].className = "btnDisabled";
|
buttons[i].disabled = true;
|
}
|
|
var foo = function() {
|
sforce.connection.sessionId = "{!GETSESSIONID()}";
|
var raid = "{!Rental_Apply__c.Id}";
|
var retMessage = sforce.apex.execute("RentalApplyWebService", "RepairRenewalCheck", {rentalApplyId: raid});
|
if (retMessage != '1') {
|
alert(retMessage);
|
} else {
|
window.open('/apex/RepairRenewal?raid={!Rental_Apply__c.Id}');
|
}
|
}
|
|
foo();</url>
|
</WebLink>
|