Soru

Zorluk: OrtaValidation Rules and Data Quality Enforcement

An organization requires that when a custom object record named Vendor_Agreement__c is set to the 'Approved' status, the custom text field Tax_Identification_Number__c must not be left empty. Which validation rule formula should a Salesforce administrator configure to enforce this requirement?

  1. AND(TEXT(Status__c) = 'Approved', ISBLANK(Tax_Identification_Number__c))Cevap
  2. B
    AND(TEXT(Status__c) = 'Approved', Tax_Identification_Number__c = '')
  3. C
    Configure Lead Field Mapping to enforce population of Tax_Identification_Number__c upon record submission.
  4. D
    Modify the active Record Type picklist assignment settings to make Tax_Identification_Number__c required.

Cevap

The validation rule formula AND(TEXT(Status__c) = 'Approved', ISBLANK(Tax_Identification_Number__c)) accurately satisfies the requirement.
The formula AND(TEXT(Status__c) = 'Approved', ISBLANK(Tax_Identification_Number__c)) evaluates to TRUE when the agreement status is set to 'Approved' while the Tax_Identification_Number__c field remains blank. Because validation rules prevent saving whenever the expression evaluates to TRUE, this formula guarantees that records cannot enter an approved state without a tax identification number.

Adım Adım Çözüm

1
Convert the picklist field value to text for evaluation.
TEXT(Status__c) = 'Approved' evaluates whether the status picklist field equals 'Approved'.
In Salesforce formula expressions, picklist fields must be wrapped in the TEXT() function to perform direct string comparisons.
2
Evaluate if the custom text field is null or empty.
ISBLANK(Tax_Identification_Number__c) returns TRUE if no data has been entered into the text field.
ISBLANK() is the standard Salesforce system function for checking whether a text or numeric field lacks a value.
3
Combine both conditions into an AND statement.
The validation rule returns TRUE whenever the status is 'Approved' AND the tax ID field is blank, thereby halting record save and presenting an error message.
Salesforce validation rules fire and block record saves when the rule expression evaluates to TRUE.

Anahtar Kavram

Enforcing conditional field completion using validation rule formulas combining TEXT() and ISBLANK() functions.
Bu soruyu puanla