高章伟
2023-03-28 32ca554edf2f2533790ad095e5691bbe478468a3
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
<?xml version="1.0" encoding="UTF-8"?>
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>Business_confirmation</fullName>
    <availability>online</availability>
    <displayType>button</displayType>
    <linkType>javascript</linkType>
    <masterLabel>营业担当确认</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;)};
var foo = function() {
var agoppId =&apos;{!Agency_Opportunity__c.Id}&apos;; 
   if (&apos;{!$Profile.Id}&apos; != &apos;00e10000000xnp2&apos;) {
      alert(&quot;您不是营业担当,无法确认。&quot;);
      return;
   }
   if (&apos;{!Agency_Opportunity__c.Business_confirmation__c}&apos; == true) {
      alert(&quot;询价已经确认,不需要重复确认。&quot;);
      return;
   }
   if (!confirm(&quot;请确认是否进行担当确认?&quot;)) { 
     return;
   }
try{
    var rs = sforce.apex.execute(&quot;upagencyOppBusinessconfirmation&quot;, &quot;Businessconfirmation&quot;,{agoppId:agoppId});
    if(rs == &quot;&quot;){
        alert(&apos;确认成功&apos;);
    }else{
        alert(&apos;确认失败&apos; + rs);
    }
}catch(e){
    alert(e);
}
window.location.reload();
};
foo();</url>
</WebLink>