高章伟
2023-03-03 d8dc84a3d56df839895f1c417a4d9cbee763d262
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?xml version="1.0" encoding="UTF-8"?>
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>NewSolutonPro</fullName>
    <availability>online</availability>
    <description>&amp;CF00N10000008rq2f_lkid={!Account.OwnerId}&amp;CF00N10000008rq2f={!Account.OwnerFullName}</description>
    <displayType>massActionButton</displayType>
    <linkType>javascript</linkType>
    <masterLabel>新建Soluton项目需求</masterLabel>
    <openType>onClickJavaScript</openType>
    <protected>false</protected>
    <requireRowSelection>true</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;)} 
var foo = function(){ 
var AccountList = sforce.connection.query(&quot;select Id, Name, Hospital__r.Salesdepartment_HP__c,Hospital__r.Name, Hospital__r.Id, Hospital__r.OCM_Category__c from Account where Id = &apos;&quot;+&quot;{!Account.Id}&quot;+&quot;&apos;&quot;); 
var acc = AccountList.getArray(&quot;records&quot;); 
 
var url = &quot;/a3k/e?Name=*&amp;CF00N10000008rq3f_lkid=&quot;+acc[0].Hospital__r.Id+&quot;&amp;CF00N10000008rq3f=&quot;+acc[0].Hospital__r.Name+&quot;&amp;CF00N10000008rq2Y_lkid={!Account.Id}&amp;CF00N10000008rq2Y={!Account.Name}&quot;; 
//20220615 you XLIU-CFDB4C 
if(acc[0].Hospital__r.Salesdepartment_HP__c == &apos;1.华北&apos;){
url += &quot;&amp;CF00N10000008rq2p_lkid={!$Label.Solution_HB}&amp;CF00N10000008rq2p=肖 娜&quot;;//00510000001OOLj
}else if(acc[0].Hospital__r.Salesdepartment_HP__c == &apos;2.东北&apos;){
url += &quot;&amp;CF00N10000008rq2p_lkid={!$Label.Solution_DB}&amp;CF00N10000008rq2p=金 丽华&quot;;//00510000001OOSZ
}else if(acc[0].Hospital__r.Salesdepartment_HP__c == &apos;3.西北&apos;){
url += &quot;&amp;CF00N10000008rq2p_lkid={!$Label.Solution_XB}&amp;CF00N10000008rq2p=王 喆&quot;;//00510000007kteE
}else if(acc[0].Hospital__r.Salesdepartment_HP__c == &apos;4.西南&apos;){
url += &quot;&amp;CF00N10000008rq2p_lkid={!$Label.Solution_XN}&amp;CF00N10000008rq2p=李 娟&quot;;//00510000001OORm
}else if(acc[0].Hospital__r.Salesdepartment_HP__c == &apos;5.华东&apos;){
url += &quot;&amp;CF00N10000008rq2p_lkid={!$Label.Solution_HD}&amp;CF00N10000008rq2p=杨 剑清&quot;;//00510000000gW9G
}else if(acc[0].Hospital__r.Salesdepartment_HP__c == &apos;6.华南&apos;){
url += &quot;&amp;CF00N10000008rq2p_lkid={!$Label.Solution_HN}&amp;CF00N10000008rq2p=位 静&quot;;//0051000000AJIrD
}else{
url += &quot;&amp;CF00N10000008rq2p_lkid=&amp;CF00N10000008rq2p=&quot;;
}
//url += &quot;&amp;CF00Np00000044oSZ_lkid={!$User.Id}&amp;CF00Np00000044oSZ={!$User.Name__c}&quot;;
url += &quot;&amp;retURL=%2F{!Account.Id}&amp;nooverride=1&quot;;
 
window.top.location.href=url; 
//window.open(url);
}
foo();</url>
</WebLink>