1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| <?xml version="1.0" encoding="UTF-8"?>
| <ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata">
| <fullName>Allow_associated_inquiries</fullName>
| <active>true</active>
| <description>考虑历史数据原因,加时间判断,创建日期大于上线时的日期(2023.08.17)</description>
| <errorConditionFormula>AND( DATEVALUE(CreatedDate) > DATE(2023,8,17),OR(TEXT( Opportunity_repeated__r.StageName ) ='目標',
| TEXT( Opportunity_repeated__r.StageName ) ='注残',
| AND(OR(TEXT( Opportunity_repeated__r.StageName ) ='出荷',TEXT( Opportunity_repeated__r.StageName ) ='完了'),
| OR( Opportunity_repeated__r.Shipping_Date_For_Report__c < DATE(IF(MONTH(TODAY()) <= 3,YEAR(TODAY()) - 1, YEAR(TODAY())), 4, 1),
| Opportunity_repeated__r.Shipping_Date_For_Report__c >= DATE(IF(MONTH(TODAY()) <= 3, YEAR(TODAY()), YEAR(TODAY()) + 1), 4, 1))),
| AND(OR(TEXT( Opportunity_repeated__r.StageName ) ='敗戦',TEXT( Opportunity_repeated__r.StageName ) ='削除') ,
| OR( Opportunity_repeated__r.Final_Contract_Proceeded_Date__c< DATE(IF(MONTH(TODAY()) <= 3,YEAR(TODAY()) - 1, YEAR(TODAY())), 4, 1),
| Opportunity_repeated__r.Final_Contract_Proceeded_Date__c >= DATE(IF(MONTH(TODAY()) <= 3, YEAR(TODAY()), YEAR(TODAY()) + 1), 4, 1)))))</errorConditionFormula>
| <errorDisplayField>Opportunity_repeated__c</errorDisplayField>
| <errorMessage>允许关联的询价,发货,完毕(完毕时间在本财年的),失单,取消(失单取消在本财年的)</errorMessage>
| </ValidationRule>
|
|