<?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("/soap/ajax/30.0/connection.js")}  
 | 
{!RequireScript("/soap/ajax/30.0/apex.js")}  
 | 
  
 | 
var foo = function(){  
 | 
var status = "{!Campaign.Status}";  
 | 
if(status == '公开中'){  
 | 
window.open( "/apex/InstructReport?camid={!URLENCODE(Campaign.Id)}", "_top"); 
 | 
}else{  
 | 
alert("只有批准后才能创建报告!");  
 | 
}  
 | 
}  
 | 
foo();</url> 
 | 
</WebLink> 
 |