binxie
2024-01-22 102afa21c115e8c8b9333a326c3d1af08fe76faf
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>CustomCreateQoute</fullName>
    <availability>online</availability>
    <displayType>massActionButton</displayType>
    <linkType>javascript</linkType>
    <masterLabel>创建报价</masterLabel>
    <openType>onClickJavaScript</openType>
    <protected>false</protected>
    <requireRowSelection>false</requireRowSelection>
    <url>{!RequireScript(&quot;/soap/ajax/51.0/connection.js&quot;)} 
{!RequireScript(&quot;/soap/ajax/51.0/apex.js&quot;)} 
{!RequireScript(&quot;/resource/CommonUtilJs&quot;)}
function foo(){
    var RecordTypeid = &apos;{!JSENCODE(Opportunity.RecordTypeId)}&apos;; 
    if(RecordTypeid==&apos;012100000006KMe&apos;){
        window.open(&apos;/apex/SI_NewQuoteEntry?oppid={!URLENCODE(Opportunity.Id)}&apos;);
    }else{
        window.open(&apos;/apex/NewQuoteEntry?oppid={!URLENCODE(Opportunity.Id)}&apos;);
    }
}
foo();</url>
</WebLink>