| <?xml version="1.0" encoding="UTF-8"?> | 
| <ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata"> | 
|     <fullName>Applicant_Check</fullName> | 
|     <active>false</active> | 
|     <errorConditionFormula>(ISNEW()|| TEXT(Status__c)='草案中')&&( | 
| ( | 
|     ((TEXT(demo_purpose2__c)='学会展会' &&  Campaign__r.RecordTypeId =='01210000000R26P' && (TEXT(Owner:User.Job_Category__c )<>'销售服务'&& TEXT(Owner:User.Job_Category__c )<>'销售推广'&& TEXT(Owner:User.Job_Category__c )<>'销售市场'&& TEXT(Owner:User.Job_Category__c )<>'培训')) | 
|     )&&($User.ProfileId <>'00e10000000Y3o5')&& | 
|                 ($User.ProfileId <>'00e10000000dEQx')&& | 
|                 ($User.ProfileId <>'00e10000000xnoT')&& | 
|         TEXT(Owner:User.Job_Category__c )<>'支援' || | 
|     ((TEXT(demo_purpose2__c)='学会展会' &&  Campaign__r.RecordTypeId !='01210000000R26P' && TEXT(Owner:User.Job_Category__c )<>'销售推广' | 
| && TEXT(Owner:User.Job_Category__c )<>'销售市场'&& TEXT(Owner:User.Job_Category__c )<>'培训' | 
| && TEXT(Owner:User.Job_Category__c )<>'GI市场' | 
| && TEXT(Owner:User.Job_Category__c )<>'SP市场' | 
| && TEXT(Owner:User.Job_Category__c )<>'管理'  | 
| && TEXT(Owner:User.Job_Category__c )<>'市场'  | 
| && TEXT(Owner:User.Job_Category__c )<>'MA'  | 
| )  | 
|     )&&($User.ProfileId <>'00e10000000Y3o5')&& | 
|                 ($User.ProfileId <>'00e10000000dEQx')&& | 
|                 ($User.ProfileId <>'00e10000000xnoT')&& | 
|         TEXT(Owner:User.Job_Category__c )<>'支援' | 
| )|| | 
|   | 
| ( | 
|     ( | 
|         TEXT(demo_purpose2__c)='试用(无询价)'|| | 
|         TEXT(demo_purpose2__c)='试用(有询价)'|| | 
|         TEXT(demo_purpose2__c)='已购待货'  | 
|               | 
|     )&&( | 
|         ($User.ProfileId <>'00e10000000Y3o5')&& | 
|                 ($User.ProfileId <>'00e10000000dEQx')&& | 
|                 ($User.ProfileId <>'00e10000000xnoT')&& | 
|                 ($User.ProfileId <>'00e10000000xo1D')&& | 
|         TEXT(Owner:User.Job_Category__c )<>'支援'&& | 
|         TEXT(Owner:User.Job_Category__c )<>'销售推广' &&  | 
|                 TEXT(Owner:User.Job_Category__c )<>'GI市场' &&  | 
|                 TEXT(Owner:User.Job_Category__c )<>'SP市场' &&  | 
|                 TEXT(Owner:User.Job_Category__c )<>'管理' &&  | 
|                 TEXT(Owner:User.Job_Category__c )<>'市场'&& | 
|                 TEXT(Owner:User.Job_Category__c )<>'销售市场' ) | 
| )||( | 
|     (TEXT(demo_purpose2__c)='新产品评价') | 
|               &&( | 
|                 TEXT(Owner:User.Dept__c)<> '消化·呼吸内镜事业本部'&&  | 
|                 TEXT(Owner:User.Dept__c)<> '外科事业本部'&&  | 
|                 TEXT(Owner:User.Dept__c)<> '能量事业本部'  | 
|                ) | 
|   | 
| )||((TEXT(demo_purpose2__c)='一般用户'|| | 
|     TEXT(demo_purpose2__c)='再修理'|| | 
|     TEXT(demo_purpose2__c)='保修用户'|| | 
|     TEXT(demo_purpose2__c)='索赔QIS'  | 
|                 | 
|     )&&( | 
|         ($User.ProfileId  <>'00e10000000Y3o5')&& | 
|         ($User.ProfileId <>'00e10000000xnoT')&& | 
|         ($User.ProfileId <>'00e10000000xo1D')&& | 
|         TEXT(Owner:User.Job_Category__c )<>'支援'&& | 
|         TEXT(Owner:User.Job_Category__c )<>'销售服务' | 
|     ) | 
| )||((           | 
|                 TEXT(Demo_purpose1__c)='协议借用' | 
|     )&&( | 
|         ($User.ProfileId <>'00e10000000Y3o5')&& | 
|                 TEXT(Owner:User.Job_Category__c )<>'支援'&& | 
|                 TEXT(Owner:User.Job_Category__c )<>'销售推广' &&  | 
|                 TEXT(Owner:User.Job_Category__c )<>'销售服务' &&  | 
|                 TEXT(Owner:User.Job_Category__c )<>'MA' &&  | 
|                 TEXT(Owner:User.Job_Category__c )<>'市场' &&  | 
|                 TEXT(Owner:User.Job_Category__c )<>'管理' | 
|     ) | 
|   | 
| ) | 
| ) | 
|  && NOT($User.Batch_User__c) && $User.ProfileId <>'00e10000000dEQx'</errorConditionFormula> | 
|     <errorMessage>申请者的权限不符合该‘使用目的’的提出要求</errorMessage> | 
| </ValidationRule> |