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 != "00e10000000Y3o5"
| &&
| IF (
| Parent.Parent.RecordTypeId = '01210000000QemG',
| 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) = '無効',
| TRUE,
| FALSE
| )
| ),
| FALSE
| )</errorConditionFormula>
| <errorMessage>科室处于无效状态,不能做任何修改。</errorMessage>
| </ValidationRule>
|
|