binxie
2024-01-17 92d30efcdebfc59500385e018d597a6b6a946075
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?xml version="1.0" encoding="UTF-8"?>
<ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>Cannot_change_to_other_department_class</fullName>
    <active>false</active>
    <description>HWAG-AUA5GR
SWAG-C67ASQ 权限先给助理2S6/2S8/2S9
1208 同时也给2S5</description>
    <errorConditionFormula>$User.Batch_User__c = false &amp;&amp; 
$User.ProfileId &lt;&gt; LEFT($Label.ProfileId_SystemAdmin, 15) &amp;&amp;
NOT(ISNEW()) &amp;&amp; ISCHANGED(AccountId) &amp;&amp;
Account.ParentId &lt;&gt; PRIORVALUE(Department_Class__c) &amp;&amp; NOT( OR( Product2.Dealer_special_Object__c , Product2.Dealer_Object__c, Product2.ENG_DeaerProFlag__c )) &amp;&amp;
Account.RecordTypeId &lt;&gt; &apos;012C600000003HG&apos; &amp;&amp; RecordTypeId &lt;&gt; &apos;012C600000003Hv&apos;
&amp;&amp; !CONTAINS($Profile.Name, &apos;2S5&apos;) &amp;&amp;!CONTAINS($Profile.Name, &apos;2S6&apos;) &amp;&amp;
!CONTAINS($Profile.Name, &apos;2S8&apos;) &amp;&amp;
!CONTAINS($Profile.Name, &apos;2S9&apos;)&amp;&amp;
!CONTAINS($Profile.Name, &apos;2S1&apos;)</errorConditionFormula>
    <errorDisplayField>AccountId</errorDisplayField>
    <errorMessage>不能修改为其他战略科室的科室。</errorMessage>
</ValidationRule>