张宇恒
2022-12-23 b4b8a2df1f478030bb321b6ac558f13fbbffbb07
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?xml version="1.0" encoding="UTF-8"?>
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>Unassign</fullName>
    <availability>online</availability>
    <displayType>massActionButton</displayType>
    <linkType>javascript</linkType>
    <masterLabel>取消分配</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;)}
//2021-10-21 gwy 版本更改为51.0
var foo = function() {
    var records = {!GETRECORDIDS($ObjectType.Rental_Apply_Equipment_Set__c)};
    if (records.length &lt; 1) { 
          window.open(&quot;/apex/EquipmentRentalUnassign?raId={!URLENCODE(Rental_Apply__c.Id)}&quot;);
    } else { 
        //弹框选择
         window.open(&quot;/apex/EquipmentRentalUnassign?raId={!URLENCODE(Rental_Apply__c.Id)}&amp;EquipmentId=&quot;+records);    
    }
};
foo()</url>
</WebLink>