<?xml version="1.0" encoding="UTF-8"?>
|
<ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata">
|
<fullName>Cannot_update_name</fullName>
|
<active>true</active>
|
<description>只有系统管理员和有权限的人,才能更新客户名。
|
$User.Account_Name_Update__c = false && $User.ProfileId != '00e10000000Y3o5' && $User.ProfileId != '00e10000000dzzG' && ISCHANGED(Name)
|
增加IsUnlock__c <>true ,医院变更信息审批通过时可以同步更新客户</description>
|
<errorConditionFormula>NOT( $User.ProfileId = '00e10000000Y3o5'
|
|| $User.ProfileId = '00e10000000dEQx'
|
||$User.ProfileId = '00e10000000dzzG'
|
||
|
(
|
(RecordType.DeveloperName = 'HP' || Parent.RecordType.DeveloperName = 'HP')
|
&&
|
( $User.ProfileId = '00e10000000xnpR'
|
|| $User.ProfileId = '00e10000000NbCE'
|
|| $User.ProfileId = '00e10000000xyK6'
|
|| $User.ProfileId = '00e10000000xnpb')
|
&&
|
(text(Is_Active__c)= '草案中' || text(Parent.Is_Active__c)= '草案中')
|
)
|
)
|
&& ISCHANGED(Name)
|
&& IsUnlock__c <> true
|
&& Parent.IsUnlock__c <> true
|
&& Parent.Parent.IsUnlock__c <> true</errorConditionFormula>
|
<errorDisplayField>MaxActivityDate__c</errorDisplayField>
|
<errorMessage>没有权限,不能更新客户名。</errorMessage>
|
</ValidationRule>
|