黄千龙
2023-03-08 962519811b7c4be07f30d09e791798b0ea79d3ae
force-app/main/default/objects/Repair__c/validationRules/work_location_select_self_or_4RC.validationRule-meta.xml
@@ -19,6 +19,8 @@
Not(Delivered_Product__r.RecordTypeId='01210000000kOPR')
&&
/* 受理办事处只能选自己省内的办事处 或 四大RC */
IF(Incharge_Staff__r.Salesdepartment__c='3.西北' && Text(On_site_repair__c)='现场修理' && Text(work_location_select__c)='北京办事处',False,
IF(Text(Incharge_Staff__r.Province__c)='浙江省' && Text(On_site_repair__c)='现场修理' && Text(work_location_select__c)='浙江办事处',False,
IF(Text(work_location_select__c)='北京办事处', False,
IF(Text(work_location_select__c)='沈阳办事处', False,
IF(Text(work_location_select__c)='上海办事处', False,
@@ -32,7 +34,7 @@
IF(Text(work_location_select__c)='共通办事处', False,
IF(Text(work_location_select__c)=Incharge_Staff__r.RepairSalesPoint_Province_China__c, False,
  True)
)))))))))))</errorConditionFormula>
)))))))))))))</errorConditionFormula>
    <errorDisplayField>work_location_select__c</errorDisplayField>
    <errorMessage>受理办事处只能选自己省内的办事处 或 七大RC</errorMessage>
</ValidationRule>