<?xml version="1.0" encoding="UTF-8"?>
|
<ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata">
|
<fullName>Cannot_Set_Hope_Lonaer_date_Num_NULL</fullName>
|
<active>true</active>
|
<errorConditionFormula>IF(OR(ISNEW()
|
,AND(Is_Auto__c ,UNIXTIMESTAMP(NOW()) - UNIXTIMESTAMP(CreatedDate) < 120)
|
,DataMigration_Flag__c
|
,ISchanged(BRId__c)
|
,ISchanged(QRId__c)
|
)
|
,false,
|
(ISPICKVAL(demo_purpose2__c, '试用(无询价)')
|
|| ISPICKVAL(demo_purpose2__c, '试用(有询价)')
|
|| ISPICKVAL(demo_purpose2__c, '新产品评价')
|
|| ISPICKVAL(demo_purpose2__c, '其他')
|
|| ISPICKVAL(demo_purpose2__c, '协议借用')
|
)
|
&& (ISNEW() || text(Status__c)=='草案中'
|
|| (ISCHANGED(Hope_Lonaer_date_Num__c))
|
)
|
&& (ISBLANK(Hope_Lonaer_date_Num__c)
|
|| Hope_Lonaer_date_Num__c = 0
|
) &&($User.ProfileId <>'00e10000000Y3o5')
|
)</errorConditionFormula>
|
<errorDisplayField>Hope_Lonaer_date_Num__c</errorDisplayField>
|
<errorMessage>希望借用天数不可以为空或者为0</errorMessage>
|
</ValidationRule>
|