Questions tagged [validation-rule]

Validation rules verify record data meets the standards you specify before the record can be saved.

Filter by
Sorted by
Tagged with
5
votes
1answer
1k views

Formula Specific to Running User?

I have a requirement where a certain field can be edited without the validations firing for a particular user. Now I tried to write rule like LastModifiedId != '005000000000000AAA' but the validation ...
3
votes
2answers
2k views

Uncheck checkboxes by changing particular checkbox state

I have custom fields in contacts form named checkbox1__c, checkbox11__c, checkbox12__c, checkbox13__c. When I check checkbox1__c then I want checkbox11__c, checkbox12__c, checkbox13__c to be ...
0
votes
2answers
2k views

Display error message if same record exist with combination of some fields?

I have taken three fields from case object called AccountName, IntegrationTo__c and SfType__c (checkbox). I have created one case record with a specific combination of three fields. For the second ...
2
votes
2answers
1k views

Can we use custom metadata type records in validation rule in salesforce?

I was trying to use custom metadata type in validation rule. My use case is i want a restriction on digits in phone number on various objects in managed package.I want to give flexibility to ...
2
votes
2answers
903 views

Validation Rule on picklist under opportunities

There are 2 requirements: standard users can’t update the status of a record beyond “open won” (so that only SF Admins or auto processes update “registered” and the stages beyond registration. ...
2
votes
3answers
295 views

Validation Rule Assist: Lock down multiple lead fields after they are first populated

I am trying to create a validation rule to lock down our original utm fields on leads after they are first populated. Essentially I would like to prevent everyone (including our marketo sync user) ...
1
vote
1answer
1k views

Error: The ISCHANGED function cannot reference the RecordType.Name field

I am trying to prevent Recordtype from being changed for Account. when I use ISCHANGED( RecordType.Name ) in validation rule, the following error appears: Error: The ISCHANGED function cannot ...
0
votes
3answers
971 views

Add a Profile Exception to Validation Rule

I have written a Validation Rule that I need to include a profile exception in. My rule is below and I can't figure out how to add an exception so that System Administrators can bypass this rule. Can ...
7
votes
1answer
873 views

Count Line Breaks?

I am trying to count the number of lines in the BillingAddress field. I am familiar with the following methodology to count the number of times a substring occurs via formula: LEN(TextField__c) - LEN(...
3
votes
2answers
5k views

Determine Case owner is queue or user?

how to check whether a case owner is a queue or a user? I am writing a validation rule where i need to check who is the owner of the case.
3
votes
1answer
5k views

any way to handle validation rule errors nicely in flows

When working with a visual flow, it seems that when you get an error saving a record because of a validation rule, that the only error Salesforce will give you is: An unhandled fault has occurred in ...
3
votes
3answers
1k views

Opportunity validation rule not firing when fields are blank

I'm trying to get this validation rule on Opportunity to fire off whenever StageName = 'Decline to Bid' AND either Lost_Reason__c(Picklist) is blank OR Lost_Details__c(Text) is blank. In other words, ...
2
votes
1answer
1k views

How to disable or readonly lookup field in standard page

EDIT: On a standard page. NOT using VF page Is it possible to write a validation rule or any approach to make a field disabled once the user save? I have a page with couple of fields including ...
2
votes
2answers
1k views

How can I create Opportunity Validation Rules without breaking Lead Conversion?

In our Salesforce process, our Opportunities have a custom Picklist field called 'Vertical' to track the industry segment of each Opportunity. I'm trying to make this a required field. I'd like to ...
2
votes
1answer
556 views

Validation Rule To Detect Translated Picklist Values?

I am trying to create a Validation rule which will stop closing the case when either the Case Type or Subtype is blank. The formula which I have written - AND( OR(ISBLANK(TEXT(Type__c)), ...
2
votes
2answers
3k views

Excluding System admin from this validation rule

I have the following validation rule ; OR( AND( Upper(MailingCountry) <> 'UK', NOT(ISBLANK(TEXT(UK_Email_Consent__c))) ), AND( Upper(MailingCountry) = '...
1
vote
2answers
266 views

Download all objects and search validation rules only

I've recently setup vs code in hopes that I could easily download all validation rules and search across them for a string. We're updating our roles and role names are used in a lot of validation ...
1
vote
3answers
3k views

Skip the validation rules for Opportunity during lead Conversion

The scenario is I only want to validate the field upon record update not creation.It works successfully when I create or update record manually with validation rules.But it fail when I convert the ...
1
vote
2answers
1k views

Validation Rules: Only the status field can be edit

I need a validation rule that prevent user to edit the record when the status is "under approval", however the status can be edit to other values. I tried the formula above, but the syntax is wrong. I'...
1
vote
2answers
991 views

How to add Validation rule for whatid

I have a requirement in which for Inactive accounts if user try to edit or create a new task then it should not allow user to save the task. It should throw some validation message. On the task object ...
1
vote
2answers
1k views

How to lock date field in opportunity? [closed]

I have few scenarios for locking the date If Closed:Won – Date locked If Stage changed to ‘Closed:Lost’ or ‘Declined’ from Closed:Won then date is changed to the date of that activity and locked ...
1
vote
1answer
2k views

Validation rule to test if a field contains only digits

I am trying to set a validation rule to check if a field contains only digits Tried this condition : !ISNUMBER(myfield__c) But the user can type 123.123 How to check that each char of the field ...
0
votes
1answer
483 views

How to make accounts read-only / locked?

It's a long story, but we have a group of account in SF that we'd like to make read-only. Ideally, these records would... Remain accessible to the same people they were before No longer be editable ...
0
votes
2answers
91 views

Rolling back a complete transaction

I have two object foo__c and zoo__c. zoo__c is a child of foo__c with a master detail relationship. I have validation rule created on Zoo__c with a condition that when the status__c field on related ...
0
votes
1answer
117 views

Validation on Dependent Field in Standard Page

How would I go implement validation on a standard salesforce page? The validation rules are: I have the following: 1) Attachment - Checkbox (default checked) 2) URL - Textbox If the Attachment ...
0
votes
2answers
899 views

Validate that a URL begins with

I do not find anyway that you can validate a valid url when the user enters in the standard page so I come up with this validation and I need little help to fix it. I'm using BEGINS to see if the url ...
-3
votes
1answer
42 views

Validation rule : Standard users cannot update the status of a record beyond one specific value in picklist [duplicate]

Requirement : Standard users cannot update the status of a record that is already Registered (or post-registered phase). Example: Opp was already “Registered” but some standard user was able to change ...