<?xml version="1.0" encoding="UTF-8"?> 
 | 
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata"> 
 | 
    <fullName>NewOPDButton_Account</fullName> 
 | 
    <availability>online</availability> 
 | 
    <displayType>massActionButton</displayType> 
 | 
    <linkType>javascript</linkType> 
 | 
    <masterLabel>新建OPD计划(科室)</masterLabel> 
 | 
    <openType>onClickJavaScript</openType> 
 | 
    <protected>false</protected> 
 | 
    <requireRowSelection>true</requireRowSelection> 
 | 
    <url>{!RequireScript("/soap/ajax/51.0/connection.js")}  
 | 
{!RequireScript("/soap/ajax/51.0/apex.js")}  
 | 
{!RequireScript("/resource/CommonUtilJs")}  
 | 
//2021-10-21 gwy 版本更改为51.0 
 | 
var toHerf= function (){  
 | 
    var AccLab_active="{!Account.Is_Active__c}"; 
 | 
    if(AccLab_active =="無効"){ 
 | 
       alert("科室状态为无效,不允许新建OPD计划"); 
 | 
       return; 
 | 
    }     
 | 
    var url = '/a3E/e?CF00N10000008ps4x_lkid={!Account.Id}'+  
 | 
    '&CF00N10000008ps4x={!HTMLENCODE(Account.Name)}'+  
 | 
        '&00N100000098amT=科室'+  
 | 
        '&Name=*'+ 
 | 
    '&retURL=%2F' + '{!HTMLENCODE(Account.Id)}';  
 | 
    window.open(url);  
 | 
}  
 | 
toHerf();</url> 
 | 
</WebLink> 
 |