binxie
2024-01-17 92d30efcdebfc59500385e018d597a6b6a946075
1
2
3
4
5
6
7
8
9
10
11
12
13
<?xml version="1.0" encoding="UTF-8"?>
<ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>CannotChangeColumnWithRepair</fullName>
    <active>false</active>
    <description>修理がある場合、商品変更できない</description>
    <errorConditionFormula>Not(Isblank(PRIORVALUE(Product2Id))) &amp;&amp; Not(Isblank(Product2Id))
&amp;&amp; Repair_Count__c &gt; 0
&amp;&amp; (ISCHANGED(Product2Id)
    || ISCHANGED(SerialNumber)
)</errorConditionFormula>
    <errorDisplayField>X147P_reserch_target__c</errorDisplayField>
    <errorMessage>修理データあります、製品を更新できません。</errorMessage>
</ValidationRule>