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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
| <?xml version="1.0" encoding="UTF-8"?>
| <CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
| <fullName>Extend_Gurantee_DateTo__c</fullName>
| <description>if( New_logic_data__c,
| /* 新数据逻辑 */
| IF(IS_Extend_Gurantee_Txt__c|| Text(warrantyType__c) = '市场多年保修' ,
| if(IS_Extend_Gurantee_Txt__c,
| /* 服务多年保修 多年保修期至 = 保修期限 */
| Guarantee_period_formula__c,
| /* 市场多年保修 多年保修期至 使用固定3年 */
| IF( AND( Not(ISBLANK(EntryDate__c)) ,EntryDate__c <= Posting_Date__c +100) ,
| ADDMONTHS( InstallDate , 3 * 12 ) ,
| ADDMONTHS( Posting_Date__c , 3 * 12 ) + 7))
| , null)
| ,
| /* 老数据原有逻辑保留 */
| IF(IS_Extend_Gurantee_Txt__c==true
| ,DATE(IF(ISBLANK(InstallDate)
| ,YEAR(Posting_Date__c)
| ,YEAR(InstallDate)
| ) +
| CASE(Product2.Entend_gurantee_period__c
| ,'两年',2
| ,'三年',3
| ,'四年',4
| ,'五年',5
| ,0
| )
| , MONTH(Guarantee_period_for_products__c)
| , DAY(Guarantee_period_for_products__c)
| )
| ,null
| )
| )</description>
| <externalId>false</externalId>
| <formula>if( New_logic_data__c,
| /* 新数据逻辑 */
| IF(IS_Extend_Gurantee_Txt__c|| Text(warrantyType__c) = '市场多年保修' ,
| if(IS_Extend_Gurantee_Txt__c,
| /* 服务多年保修 多年保修期至 = 保修期限 */
| Guarantee_period_formula__c,
| /* 市场多年保修 多年保修期至 使用固定3年 */
| ADDMONTHS( InstallDate__c , ProvistonPeriod__c * 12 ))
| , null)
| ,
| /* 老数据原有逻辑保留 */
| IF(IS_Extend_Gurantee_Txt__c==true
| ,DATE(IF(ISBLANK(InstallDate)
| ,YEAR(Posting_Date__c)
| ,YEAR(InstallDate)
| ) +
| CASE(Product2.Entend_gurantee_period__c
| ,'两年',2
| ,'三年',3
| ,'四年',4
| ,'五年',5
| ,0
| )
| , MONTH(Guarantee_period_for_products__c)
| , DAY(Guarantee_period_for_products__c)
| )
| ,null
| )
| )</formula>
| <label>多年保修期至</label>
| <required>false</required>
| <trackHistory>false</trackHistory>
| <type>Date</type>
| </CustomField>
|
|