binxie
2024-01-20 0a2fc19461a141fbbb2c303142afdee22c72daac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?xml version="1.0" encoding="UTF-8"?>
<ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>CannotChangeColumnFromIF</fullName>
    <active>true</active>
    <description>SAPからの納入機器の場合シリアルNoなどI/Fの項目を変更できません</description>
    <errorConditionFormula>$User.UserRoleId &lt;&gt; LEFT(&apos;00E10000000e30A&apos;, 15)  &amp;&amp; 
$User.ProfileId &lt;&gt;  LEFT($Label.ProfileId_SystemAdmin, 15)&amp;&amp; 
$User.Id  &lt;&gt;  LEFT(&apos;00510000004rbs0&apos;, 15) 
&amp;&amp; text($User.UserType) &lt;&gt; &apos;PowerCustomerSuccess&apos; 
&amp;&amp; RecordTypeId = &apos;01210000000kOPM&apos; 
&amp;&amp; $User.Batch_User__c = False &amp;&amp; IF_Information_From__c
&amp;&amp; (ISCHANGED(Posting_Date__c)
    || ISCHANGED(Product2Id)
    || ISCHANGED(SerialNumber)
    || (ISCHANGED(InstallDate) &amp;&amp; $Profile.Id &lt;&gt; &apos;00e10000000edWm&apos;)
    || ISCHANGED(SLMark__c)
    || ISCHANGED(Guarantee_period_for_products__c)
)</errorConditionFormula>
    <errorMessage>SAPからの納入機器の場合I/Fの項目を変更できません</errorMessage>
</ValidationRule>