binxie
2024-01-16 4d3febe8045eb0fa0283af3c53b0c48344b8664d
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
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>Shipping_Scheduled_Date_For_Report__c</fullName>
    <description>为了避免报表中只显示注残预测发货日在下月月底之前的订单,而不显示没有填写注残预测发货日的记录,设定此字段. 20231011ws修改前逻辑:IF(isnull(Shipping_Scheduled_Date__c),Opportunity__r.CloseDate,Shipping_Scheduled_Date__c)
20231028 21.预测最晚交货期超过2年时也不要</description>
    <externalId>false</externalId>
    <formula>IF(isnull(Shipping_Scheduled_Date__c), 
    IF( 
        OR( 
            AND( 
              YEAR(Opportunity__r.CloseDate) =  YEAR(TODAY()),
              MONTH(Opportunity__r.CloseDate) &lt; MONTH(TODAY())
              ),
            YEAR(Opportunity__r.CloseDate) &lt;  YEAR(TODAY())
        ),
        DATE( YEAR(TODAY()) , MONTH(TODAY()) ,1) 
        , Opportunity__r.CloseDate
    ),  
    IF( 
        OR( 
            AND( 
              YEAR(Shipping_Scheduled_Date__c) =  YEAR(TODAY()),
              MONTH(Shipping_Scheduled_Date__c) &lt; MONTH(TODAY())
              ),
            YEAR(Shipping_Scheduled_Date__c) &lt;  YEAR(TODAY())
        ),
        DATE( YEAR(TODAY()) , MONTH(TODAY()) ,1) 
        , Shipping_Scheduled_Date__c
    )
)</formula>
    <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>
    <label>报表用注残预测发货日</label>
    <required>false</required>
    <trackHistory>false</trackHistory>
    <trackTrending>false</trackTrending>
    <type>Date</type>
</CustomField>