Li Jun
2022-05-10 51fb56f3f5b0dc96d7f93a71f9b61263e303243f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?xml version="1.0" encoding="UTF-8"?>
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>CreateInstructReport</fullName>
    <availability>online</availability>
    <displayType>massActionButton</displayType>
    <linkType>javascript</linkType>
    <masterLabel>新建带教报告</masterLabel>
    <openType>onClickJavaScript</openType>
    <protected>false</protected>
    <requireRowSelection>true</requireRowSelection>
    <url>{!RequireScript(&quot;/soap/ajax/30.0/connection.js&quot;)} 
{!RequireScript(&quot;/soap/ajax/30.0/apex.js&quot;)} 
 
var foo = function(){ 
var status = &quot;{!Campaign.Status}&quot;; 
if(status == &apos;公开中&apos;){ 
window.open( &quot;/apex/InstructReport?camid={!URLENCODE(Campaign.Id)}&quot;, &quot;_top&quot;);
}else{ 
alert(&quot;只有批准后才能创建报告!&quot;); 
foo();</url>
</WebLink>