涂煌豪
2022-05-17 c406cfcd9ce37fd43711bb12b3dae2b3bd120c49
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>QIS_SC</fullName>
    <availability>online</availability>
    <displayType>button</displayType>
    <linkType>javascript</linkType>
    <masterLabel>QIS市场部意见</masterLabel>
    <openType>onClickJavaScript</openType>
    <protected>false</protected>
    <url>{!RequireScript(&quot;/soap/ajax/51.0/connection.js&quot;)}
{!RequireScript(&quot;/soap/ajax/51.0/apex.js&quot;)}
{!RequireScript(&quot;/resource/CommonUtilJs&quot;)}
//2021-10-21 gwy 版本更改为51.0
var foo = function() {
var qis = &apos;{!QIS_Report__c.QIS_SC_Report__c}&apos;;
var id =&apos;{!QIS_Report__c.QIS_SC_Id__c}&apos;;
var action = &apos;{!QIS_Report__c.next_action__c}&apos;;
var pro = &apos;{!QIS_Report__c.QIS_Market_Category__c}&apos;
// 20210531 add by gzw
if(&quot;{!$Profile.Id}&quot; == &quot;00e10000000xno9&quot; || &quot;{!$Profile.Id}&quot; == &quot;00e10000000NbC4&quot;){
alert(&quot;您没有新建QIS市场部权限。&quot;);
return;
}
// 20210531 add by gzw
if(qis){
var url = &apos;https://ocsm--stagefull.my.salesforce.com/&apos;+id;
window.open(url);
}else{
if(action ==&apos;送回&apos;&amp;&amp;(pro ==&apos;ET&apos; || pro ==&apos;ENG&apos;||pro==&apos;EndoRapid&apos;)){
var urlStr =&apos;/a3w/e?CF00N100000095xFJ={!HTMLENCODE(QIS_Report__c.Name)}&apos;+
&apos;&amp;CF00N100000095xFJ_lkid={!HTMLENCODE(QIS_Report__c.Id)}&apos;+
&apos;&amp;retURL={!HTMLENCODE(QIS_Report__c.Id)}&apos;+
&apos;&amp;Name={!HTMLENCODE(QIS_Report__c.Name)}&apos;;
window.open(urlStr);
}else{
alert(&apos;对应方法为返回且对应主机/消耗品为ET 或 ENG 或 EndoRapid 时,才可以新建。&apos;);
return;
}
 
}
}
foo();</url>
</WebLink>