<?xml version="1.0" encoding="UTF-8"?>
|
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
|
<fullName>toBatchUser</fullName>
|
<availability>online</availability>
|
<displayType>button</displayType>
|
<linkType>javascript</linkType>
|
<masterLabel>变更所有者到Batch</masterLabel>
|
<openType>onClickJavaScript</openType>
|
<protected>false</protected>
|
<url>{!RequireScript("/soap/ajax/51.0/connection.js")}
|
{!RequireScript("/soap/ajax/51.0/apex.js")}
|
|
var foo = function() {
|
if ('{!$Profile.Id}' != "00e10000000Y3o5") {
|
alert("你没有操作权限");
|
return;
|
}
|
if (!confirm("无效客户的所有人将变为Batch User,请确认需要转移的信息是否都转移完毕。\n是否继续?")) {
|
return;
|
}
|
var hpid = '{!Account.Id}';
|
var rtn = sforce.apex.execute("AccountWebService", "toBatchOwner", {hpid:hpid});
|
if (rtn != 'OK') {
|
alert(rtn);
|
return;
|
}
|
|
alert("无效客户的所有人已变为Batch User");
|
window.location.reload();
|
}
|
foo();</url>
|
</WebLink>
|