function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sanjusfdcsanjusfdc 

validation rule - When Division record type and Division type is Sales Division, Division Reason is required

Hello All,
I created Validation Rule for this.
AND($RecordType.DeveloperName = 'Division_Sales' ,
ISPICKVAL(Division _Type__c, "Sales Division"),
(ISBLANK(Division_Reason__c)

Where I am doing a mistake? Help me check this.
Thank You!
 
Best Answer chosen by sanjusfdc
SubratSubrat (Salesforce Developers) 
Hello ,

The validation rule you've written is mostly correct. However, there is a small mistake in the field name Division Type_c. There seems to be an extra space between "Division" and "Type" in the field API name.

Here's the corrected validation rule:
AND(
    $RecordType.DeveloperName = 'Division_Sales',
    ISPICKVAL(Division_Type__c, "Sales Division"),
    ISBLANK(Division_Reason__c)
)

If this helps , please mark this as Best Answer.
Thank you.

All Answers

SubratSubrat (Salesforce Developers) 
Hello ,

The validation rule you've written is mostly correct. However, there is a small mistake in the field name Division Type_c. There seems to be an extra space between "Division" and "Type" in the field API name.

Here's the corrected validation rule:
AND(
    $RecordType.DeveloperName = 'Division_Sales',
    ISPICKVAL(Division_Type__c, "Sales Division"),
    ISBLANK(Division_Reason__c)
)

If this helps , please mark this as Best Answer.
Thank you.
This was selected as the best answer
sanjusfdcsanjusfdc
Thank you Subrat, I dont knwo how i did mistake. well issue resolved.