binxie
2024-01-17 92d30efcdebfc59500385e018d597a6b6a946075
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>FSE_Cannot_change_to_other_hospital</fullName>
    <active>false</active>
    <description>SWAG-C8MB5U</description>
    <errorConditionFormula>$User.Batch_User__c = false &amp;&amp; 
$User.ProfileId &lt;&gt; LEFT($Label.ProfileId_SystemAdmin, 15) &amp;&amp; OR(CONTAINS($Profile.Name, &apos;2S5&apos;),CONTAINS($Profile.Name, &apos;2S6&apos;),CONTAINS($Profile.Name, &apos;2S8&apos;),CONTAINS($Profile.Name, &apos;2S9&apos;),CONTAINS($Profile.Name, &apos;2S1&apos;)) &amp;&amp;
NOT(ISNEW()) &amp;&amp;
 Account.Parent.ParentId  &lt;&gt; PRIORVALUE( Hospital__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;</errorConditionFormula>
    <errorDisplayField>AccountId</errorDisplayField>
    <errorMessage>不能修改为其他医院的科室。</errorMessage>
</ValidationRule>