binxie
2024-01-20 0a2fc19461a141fbbb2c303142afdee22c72daac
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>Dept_Effective_Check</fullName>
    <active>true</active>
    <description>診療科無効の場合、診療科更新できません</description>
    <errorConditionFormula>$Profile.Id != &quot;00e10000000Y3o5&quot;
&amp;&amp;
IF (
  Parent.Parent.RecordTypeId = &apos;01210000000QemG&apos;,
  IF (
  /* 可以更新的字段 */
  OR(ISCHANGED(Service_contract_active_number__c),
     ISCHANGED(Opportunity_amount__c),
     ISCHANGED(Is_Active__c),
     ISCHANGED(OwnerId),
     ISCHANGED(OCM_Category__c)
    ), FALSE,
    IF (
      TEXT(Is_Active__c) = &apos;無効&apos;,
      TRUE,
      FALSE
    )
  ),
  FALSE
)</errorConditionFormula>
    <errorMessage>科室处于无效状态,不能做任何修改。</errorMessage>
</ValidationRule>