Li Jun
2022-05-11 b776940205e893302f77d24c4285613f228b44c6
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
<?xml version="1.0" encoding="UTF-8"?>
<ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>Only_OPDtoSIS</fullName>
    <active>true</active>
    <description>OPD和SIS</description>
    <errorConditionFormula>ISCHANGED(RecordTypeId) &amp;&amp;
(
/**OPD或SIS变到非OPDSIS**/
 ((PRIORVALUE(RecordTypeId) = &quot;01210000000RLTi&quot;
  ||
 PRIORVALUE(RecordTypeId) = &quot;01210000000Qekj&quot;) 
 &amp;&amp; 
 (RecordTypeId &lt;&gt; &quot;01210000000RLTi&quot;
  &amp;&amp;
 RecordTypeId &lt;&gt; &quot;01210000000Qekj&quot;))
||
/**非OPDSIS变到OPD或SIS**/
 ((PRIORVALUE(RecordTypeId) &lt;&gt; &quot;01210000000RLTi&quot;
  &amp;&amp;
 PRIORVALUE(RecordTypeId) &lt;&gt; &quot;01210000000Qekj&quot;) 
 &amp;&amp; 
 (RecordTypeId = &quot;01210000000RLTi&quot;
  ||
 RecordTypeId = &quot;01210000000Qekj&quot;))
)</errorConditionFormula>
    <errorMessage>只能在OPD报告书和SIS报告书的类型之间相互变换</errorMessage>
</ValidationRule>