<?xml version="1.0" encoding="UTF-8"?>
|
<ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata">
|
<fullName>Last_Reserve_Valitaion</fullName>
|
<active>true</active>
|
<description>主体と個体附属品の場合、
|
最新备品申请借出明细历史のvalitaion rule, 从空变有值 OK,有值到有值 (值变化的话)NG</description>
|
<errorConditionFormula>/* 主体也是'个体管理' 的 */
|
Ispickval(Manage_type__c, '个体管理')
|
&&
|
/* 下架后,有值到有值 (值变化的话)NG */
|
ISCHANGED(Last_Reserve_RAES_Detail__c)
|
&& Not(IsNew())
|
&& Not(Isblank(PRIORVALUE(Last_Reserve_RAES_Detail__c)))
|
&& Not(ISBLANK(Last_Reserve_RAES_Detail__c))
|
&& Not(
|
ISBLANK(Last_Reserve_RAES_Detail__r.StockDown_time__c)
|
)
|
&& NOT( TEXT(Last_Reserve_RAES_Detail__r.Rental_Apply__r.Routine_Check_Status__c) = 'OK' )
|
&& AssetManageConfirm__c = TRUE
|
&& NOT($User.Batch_User__c)
|
&& $User.ProfileId <>'00e10000000dEQx' &&
|
$User.ProfileId <>'00e10000000Y3o5'</errorConditionFormula>
|
<errorDisplayField>Last_Reserve_RAES_Detail__c</errorDisplayField>
|
<errorMessage>下架后「最新备品申请借出明细」不能修改分配</errorMessage>
|
</ValidationRule>
|