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
Marypearl ParnellMarypearl Parnell 

Creating a validation rule based on a picklist field value

I'm looking for a way to create a validation rule on a particular picklist field value. It's looking more like I'll need a trigger for this particular request, and I'm not the best when it comes to writing triggers or classes.
Seeing as I'm the only Salesforce developer on site, I'm hoping for assistance in this task.

Here's how the rule goes:
For the Asset ID custom object, on only the Geotab record type, if the field Activation Status equals 'Complete', then the following fields are required:

MyAdmin Activation Date <> Blank
MyAdmin Plan <> Blank
Geotab Billing <> Blank
Customer Type <> Blank
Service Plan <> Blank
Primary Billing Party <> Blank
JDE Service Account <> Blank
Billing Start Date <> Blank
Recurring Revenue <> Blank
Prasun BanerjiPrasun Banerji
You can try a validation rule like below. You need to keep adding all the fields as comma separated.

AND($RecordType.Name = "RecordID Name", 
TEXT(ActivationStatus) = 'Complete',
ISBLANK(MyAdmin Plan),
ISBLANK(MyAdmin Activation Date)
)
Marypearl ParnellMarypearl Parnell
What if it's a picklist field? I usually get the error that they only work in certain functions.
Prasun BanerjiPrasun Banerji
You can try this if those fields are picklists.

AND($RecordType.Name = "RecordID Name", 
TEXT(ActivationStatus) = 'Complete',
TEXT(MyAdmin Plan)='',
TEXT(MyAdmin Activation Date)=''
)

Please send me a screenshot of the editor page if this still does not work.
Marypearl ParnellMarypearl Parnell
I'm getting an error that the Incorrent argument type for function 'ISBLANK()'. I tried uploading the screenshot, but the Insert Image dialog box isn't allowing me to do so. It just sits there after I've added the image.
AND($RecordType.Name="Geotab",
(TEXT(Activation_Status__c)='Complete'),
ISBLANK(MyAdmin_Plan__c),
ISBLANK(MyAdmin_Activation_Date__c),
ISBLANK(TEXT(Geotab_Billing__c)),
ISBLANK(TEXT(Customer_Type__c)),
ISBLANK(TEXT(Service_Plan__c)),
ISBLANK(Billing_Party__c),
ISBLANK(JDE_Service_Account__c),
ISBLANK(Billing_Start_Date__c),
ISBLANK(Recurring_Revenue__c))

 
Marypearl ParnellMarypearl Parnell
User-added image
Marypearl ParnellMarypearl Parnell
The code works beautifully now!
Thanks so much for your help Prasun.