<?xml version="1.0" encoding="UTF-8"?>
<ValidationRule xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>AWAL_CheckArtistVideoChannel</fullName>
    <active>true</active>
    <errorConditionFormula>AND(
    RecordType.DeveloperName = &quot;AWAL&quot;,
    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")))),
    ISPICKVAL(VideoRights__c, &quot;Channel&quot;),
    OR(
        ISPICKVAL(StageName, &quot;Passed to BA&quot;),
        ISPICKVAL(StageName, &quot;With BA (Short Form)&quot;),
        ISPICKVAL(StageName, &quot;With BA (Long Form)&quot;),
        ISPICKVAL(StageName, &quot;Closed - No Interest&quot;),
        ISPICKVAL(StageName, &quot;Closed Lost (Tracking)&quot;),
        ISPICKVAL(StageName, &quot;Closed - No Interest&quot;)
    ),
    ISBLANK(ArtistVideoChannel__c)
)</errorConditionFormula>
    <errorDisplayField>ArtistVideoChannel__c</errorDisplayField>
    <errorMessage>Please fill in the Artist Video Channel when Video Rights is set to Channel and the stage is Passed to BA.</errorMessage>
</ValidationRule>
