| <?xml version="1.0" encoding="UTF-8"?> | 
| <ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata"> | 
|     <fullName>New_FromOPD_AccountEquals</fullName> | 
|     <active>true</active> | 
|     <description>从OPD计划创建报告书时,检查报告书中的战略科室是否与OPD计划中的战略科室一致</description> | 
|     <errorConditionFormula>(isnew()|| ISCHANGED(Department_Class_Ref__c)|| ISCHANGED(Report_OPDPlan__c) ) | 
| &&Not(ISBLANK(Report_OPDPlan__c)) | 
| &&Not(ISBLANK(Report_OPDPlan__r.OCM_category_ID__c)) | 
| && (Report_OPDPlan__r.OCM_category_ID__c != Department_Class_Ref__c)&& !$User.Batch_User__c</errorConditionFormula> | 
|     <errorDisplayField>Department_Class_Ref__c</errorDisplayField> | 
|     <errorMessage>请检查报告书中的战略科室是否与OPD计划中的战略科室一致</errorMessage> | 
| </ValidationRule> |