高章伟
2022-03-10 8db20630a2675ca14e03ccdee91c614397b5c964
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?xml version="1.0" encoding="UTF-8"?>
<ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>rentalNumChk</fullName>
    <active>true</active>
    <description>借出备品配套一览明细可借出数量不能超过备品配套明细设定的数量
IsBlank(Fixture_Set_Detail__c) 的话也不让改</description>
    <errorConditionFormula>DataMigration_Flag__c == false
&amp;&amp; OR(
    IsNew()
  , ISCHANGED(Rental_Num__c)
)
&amp;&amp; OR(
    Not(IsBlank(Fixture_Set_Detail__c)) &amp;&amp; Rental_Num__c &gt; Fixture_Set_Detail__r.Quantity__c
  , IsBlank(Fixture_Set_Detail__c) &amp;&amp; ISCHANGED(Rental_Num__c)
)</errorConditionFormula>
    <errorDisplayField>Rental_Num__c</errorDisplayField>
    <errorMessage>借出备品配套一览明细可借出数量不能超过备品配套明细设定的数量</errorMessage>
</ValidationRule>