高章伟
2022-03-10 8db20630a2675ca14e03ccdee91c614397b5c964
1
2
3
4
5
6
7
8
9
10
11
12
13
<?xml version="1.0" encoding="UTF-8"?>
<ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>New_FromOPD_AccountEquals</fullName>
    <active>true</active>
    <description>从OPD计划创建备品申请时,检查备品申请中的科室是否与OPD计划中的科室一致
update lxy 20210114  分单不触发验证规则 添加了ISBLANK(Old_Rental_Apply__c )条件</description>
    <errorConditionFormula>((isnew() &amp;&amp; ISBLANK(Old_Rental_Apply__c ))|| ISCHANGED(Account__c)|| ISCHANGED(OPDPlan__c) )
&amp;&amp;Not(ISBLANK(OPDPlan__c))
&amp;&amp;Not(ISBLANK(OPDPlan__r.Account_Laboratory__c ))
&amp;&amp; (OPDPlan__r.Account_Laboratory__c != Account__c)</errorConditionFormula>
    <errorDisplayField>Account__c</errorDisplayField>
    <errorMessage>请检查备品申请中的科室是否与OPD计划中的科室一致</errorMessage>
</ValidationRule>