<?xml version="1.0" encoding="UTF-8"?>
<ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>AWAL_Require_DealLostTo</fullName>
    <active>true</active>
    <errorConditionFormula>AND(
    RecordType.DeveloperName = &apos;AWAL&apos;,
    NOT($Permission.AWAL_Bypass_VRs),
        NOT(AND(Is_Migrated__c, OR(ISPICKVAL(Migrated_From_Opportunity__r.StageName, "Pass to Approver (KLS only)"), ISPICKVAL(Migrated_From_Opportunity__r.StageName, "Passed to Finance"), ISPICKVAL(Migrated_From_Opportunity__r.StageName, "Passed to BA")))),
    ISBLANK(TEXT(DealLostTo__c)),
    ISPICKVAL(StageName, &quot;Closed Lost&quot;)
)</errorConditionFormula>
    <errorDisplayField>DealLostTo__c</errorDisplayField>
    <errorMessage>&quot;Deal Lost To&quot; must be populated when the opportunity stage is Closed Lost</errorMessage>
</ValidationRule>
