高章伟
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
<?xml version="1.0" encoding="UTF-8"?>
<WebLink xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>Split_Apply</fullName>
    <availability>online</availability>
    <description>update lxy 2021/6/18
去掉了如下逻辑
else { 
        var raid = &apos;{!Rental_Apply__c.Id}&apos;;
        var soql = &quot;select RAES_Status__c from Rental_Apply_Equipment_Set__c where Rental_Apply__c=&apos;&quot; 
+ raid + &quot;&apos;&quot;; 
        var allRecords = sforce.connection.query(soql).getArray(&quot;records&quot;); 
        var validSize= allRecords .length; 
        if (validSize==1) {
            alert(&quot;这个申请单只有一条借出备品一览,不能分单&quot;); 
        } else if(validSize == records.length) {
            alert(&quot;不能全选借出备品一览分单&quot;);</description>
    <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;)}
var foo = function() {
    var records = {!GETRECORDIDS($ObjectType.Rental_Apply_Equipment_Set__c)};
    if (records.length &lt; 1) { 
        alert(&quot;请选择借出备品一览记录&quot;); 
    } else { 
         window.open(&quot;/apex/RentalApplySplit?objId={!URLENCODE(Rental_Apply__c.Id)}&amp;raesIds=&quot;+records, &apos;RentalApplySplit&apos;, &apos;width=600,height=200&apos;);    
    }
};
foo()</url>
</WebLink>