| <?xml version="1.0" encoding="UTF-8"?> | 
| <ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata"> | 
|     <fullName>OnlyAgencyCanEditTarget</fullName> | 
|     <active>true</active> | 
|     <errorConditionFormula>RecordType.DeveloperName == 'Target' | 
| && IsBlank($User.ContactId) | 
| && Not($User.Batch_User__c) | 
| && Not(IsBlank(Agency_Hospital_Target__c)) && $User.ProfileId <>'00e10000000Y3o5'</errorConditionFormula> | 
|     <errorMessage>只有经销商可以修改目标</errorMessage> | 
| </ValidationRule> |