Li Jun
2022-04-13 5c01ebbfddb6b8674430b47c22977bea2e350084
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?xml version="1.0" encoding="UTF-8"?>
<ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>For_contract_loaner_only_have_contract</fullName>
    <active>true</active>
    <description>保修用户,当没有维修合同的时候,不能申请备品</description>
    <errorConditionFormula>RecordTypeId  &lt;&gt; &quot;01210000000RHIn&quot;  &amp;&amp; 
(TEXT(demo_purpose2__c) == &apos;保修用户&apos;) &amp;&amp; 
Repair__c != null &amp;&amp; 
(Repair__r.Number_of_EffectiveContract__c == &apos;无&apos;) &amp;&amp; 
($User.ProfileId &lt;&gt;&apos;00e10000000Y3o5&apos;) &amp;&amp; NOT(AND(Repair__r.NewProductGuaranteeObject__c == &apos;2: 多年保修&apos; || Repair__r.NewProductGuaranteeObject__c == &apos;2: 服务多年保修&apos;, 
OR(Repair__r.Delivered_Product__r.Product2.Asset_Model_No__c == &apos;LTF-190-10-3D&apos;,
Repair__r.Delivered_Product__r.Product2.Asset_Model_No__c == &apos;LTF-S190-5&apos;,
Repair__r.Delivered_Product__r.Product2.Asset_Model_No__c == &apos;CYF-VHA&apos;,
Repair__r.Delivered_Product__r.Product2.Asset_Model_No__c == &apos;CYF-VA2&apos;,
Repair__r.Delivered_Product__r.Product2.Asset_Model_No__c == &apos;CYF-5A&apos;,
Repair__r.Delivered_Product__r.Product2.Asset_Model_No__c == &apos;LTF-S190-10&apos;,
Repair__r.Delivered_Product__r.Product2.Asset_Model_No__c == &apos;OER-AW&apos;,
Repair__r.Delivered_Product__r.Product2.Asset_Model_No__c == &apos;URF-V&apos;,
Repair__r.Delivered_Product__r.Product2.Asset_Model_No__c == &apos;URF-V2&apos;,
Repair__r.Delivered_Product__r.Product2.Asset_Model_No__c == &apos;URF-P6&apos;
)))</errorConditionFormula>
    <errorMessage>保修用户,当没有维修合同的时候,不能申请备品</errorMessage>
</ValidationRule>