涂煌豪
2022-05-06 ff435968945d457f9ee653a9620fa1c7d78d2d4c
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
<?xml version="1.0" encoding="UTF-8"?>
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>CustomAnew</fullName>
    <availability>online</availability>
    <displayType>massActionButton</displayType>
    <linkType>javascript</linkType>
    <masterLabel>合同再报价</masterLabel>
    <openType>onClickJavaScript</openType>
    <protected>false</protected>
    <requireRowSelection>true</requireRowSelection>
    <url>if (&quot;{!Maintenance_Contract__c.Status__c}&quot; != &quot;引合中&quot;) {
    alert(&quot;维修合同不是询价中的状态,不能再报价&quot;);
} else {
    var ids = {!GETRECORDIDS( $ObjectType.Maintenance_Contract_Estimate__c)};
    if (ids.length == 1) {
        if(&quot;{!Maintenance_Contract__c.RecordTypeId}&quot;  == &quot;01210000000gTYq&quot;){
             window.open( &quot;/apex/SelectAssetEstimateVM?copyid=&quot; + ids[0], &quot;_top&quot;);
        }else{
             window.open( &quot;/apex/SelectAssetEstimate?copyid=&quot; + ids[0], &quot;_top&quot;);
        }
        
    } else {
        alert(&apos;请选择一个报价&apos;);
    }
}</url>
</WebLink>