Questions tagged [validation-rule]
Validation rules verify record data meets the standards you specify before the record can be saved.
1,156 questions
0
votes
1
answer
30
views
Account Validation rule causing SQL error
I created a simple validation rule on the std Account sObject
AND(
NOT(ISBLANK(ParentId))
, billingCountry = Parent.billingCountry
)
This validation rule causes sql errors on CRUD operations ...
0
votes
1
answer
18
views
To resolve Meeting - Speaker Meeting is locked and cannot be deleted error while deleting a Meeting record
As i need to delete one Meeting Record created in 2020, but unable to delete since i am receiving this error. "Meeting - Speaker Meeting is locked and cannot be deleted".
Please find the ...
0
votes
2
answers
42
views
validation rule formula on picklist field value which have symbols(-,())
Criteria: when i create a record if picklist field value is ABC 99 - PAQ (XYZ) , closed date field should not be empty. i tried below formula but getting syntax error at ") . do i need add any ...
0
votes
1
answer
38
views
Validation rule blocking creation of amendments
I have created this validation rule where a check box should not be editable on amendment quotes whether you add a new product or edit an existing one.
But this is blocking me from creating amendment ...
0
votes
0
answers
23
views
Validation Rule to Prompt User to Enter Products when NOT New throwing Flow errors
My validation rule is to prompt users to enter products upon EDIT after initial creation (as to not interrupt conversions). It works fine upon edit, but when creating a NEW opportunity using the NEW ...
2
votes
0
answers
57
views
Failure updating ValidationRule using Tooling API
I'm trying to disable a validation rule using the Tooling API, I was able to update custom fields using the API and assumed this will follow the same method, but something is wrong and I'm not sure if ...
0
votes
1
answer
25
views
Salesforce User with a certain profile can only delete contact base on Account.field__c and the user.field__c is the same
Salesforce User with a certain profile can only delete contact base on Account.field__c and the user.field__c is the same.
do you guys have any ideas on how to do this. I need the user to delete a ...
0
votes
0
answers
27
views
on salesforce knowledge object
When the article is in draft status and approval status is not approved, the user click on the publish button it is allowing to publish the article.
My requirement is when user click on publish button ...
-1
votes
1
answer
76
views
Validation Rule on File
I was asked to ensure that files cannot be deleted after 24 hours. I tried to create a validation rule, but the closest object I found to 'File' in the Object Manager is the 'ContentVersion' object. ...
0
votes
1
answer
57
views
What is the better way to know if the value was already used in the record previously?
I need to have a validation wherein a certain picklist value (e.g: in progress) was already selected before in the record. So basically, the "in progress' status should only be selected once in ...
-1
votes
1
answer
119
views
Required Lookup field | Screen flow
I have a field in a screen flow. This field is used by different departments, but one in particular is asking me to make the field mandatory when the user navigates through the screen flow. The issue ...
0
votes
1
answer
57
views
Salesforce API Error: CANNOT_MODIFY_MANAGED_OBJECT for ValidationRule
I'm encountering an issue modifying a Salesforce Validation Rule via the API. My attempt to update the rule with the ID '03dDn000001evPOIAY' results in the error message:
"Cannot modify managed ...
-2
votes
2
answers
39
views
Validation Rule on Call Object
I am trying to create new Validation rule in "Call" object with field Attachment_placed_on_the_call__c as checkbox for the following requirement:
If Interaction Type is "Reactive" ...
0
votes
1
answer
38
views
How to verify a custom metadata type relationship field's datatype
I have a CMDT SObject called MyCmdt__mdt
It has two fields
Field Name
Field Type
SObjectType__c
Metadata Relationship (Entity Definition)
SObjectField__c
Metadata Relationship (Field Definition)
I ...
1
vote
1
answer
50
views
Having difficulties hiding a picklist value with a Custom permission and a Validation rule
I need to be able to hide one picklist value from a field on a Custom object from a set of users. I've created a Custom permission (View All Statuses), and a Permission set to assign to users who ...
-2
votes
2
answers
149
views
Salesforce Validation Rule - make a picklist field required when checkbox is true [closed]
This seems like it should be simple, but I'm struggling.
I have two fields:
ApprovedSupplier__c is a checkbox, when it's checked and it's value is true, I need the picklist field SupplierTier__c to ...
0
votes
0
answers
50
views
How to prevent a 2GP Package from being blocked by a customer's validation rules?
When a user installs my AppExchange package, I am using the InstallHandler to run a Batch job to populate a new custom field on the Opportunity object for every single opportunity, as recommended here....
1
vote
1
answer
38
views
Can't send an automatic email when validation rule is triggered
When I get an email from specific email address with specific subject, I want to:
Block this email from creating a case
send an automatic email to this email address that their case wasn't created.
...
0
votes
1
answer
59
views
Validation rule that excludes a picklist doesn't work
I have a validation rule that prevents the case from closing if it does not have an associated account, however, I need to ignore this rule if the picklist value is "E-mails que não são casos&...
0
votes
2
answers
62
views
How to exclude a related object type from validation rule
I have an Object called 'Program' which is creating/inserting a Task record.
On the Task I have a validation rule for a specific profile which is blocking the creation of Program indirectly through a ...
0
votes
1
answer
56
views
Validation Rule firing for Unknown Reason
Here is my rule - it fires when I try to move to > 75% probability on an Opportunity NOT owned by me.
It does NOT fire in my sandbox.
AND(
Owner.Id = LastModifiedBy.Id ,
ISCHANGED(Probability),
...
0
votes
0
answers
33
views
Oracle exception updating Account record
On the Account SObject I have defined a validationRule which checks that the billing country of a record must be the same as parent account's billing country if it is defined
AND(
NOT(ISBLANK(...
1
vote
1
answer
44
views
What's this Label in Validation Rule?
I was looking at a Validation Rule and it has below text. I would like to know where this $Label is located in Object Manager?
CONTAINS($Label.List_of_users_and_profiles, $User.Id),
CONTAINS($Label....
0
votes
1
answer
139
views
Validation to require a field updated
I need a couple number fields updated when a checkbox is checked, but if there's already info in the number fields I want it updated. Here's what I have:
AND(
Field_Follow_CAxT__c = True,
OR(
ISBLANK(...
1
vote
0
answers
85
views
Avoid using merge fields in validation formulas
So I've just come across this as part of Salesforce best practices for validation rules.
Avoid using the IsClosed or IsWon opportunity merge fields in validation formulas. Instead, use the ISPICKVAL ...
-1
votes
2
answers
56
views
Need help in forming validation rule
I have to two fields Payment status and manager status
So have to create a validation rule where if Manager status is Blank and payment status is closed then block payment status update.
My formula is
...
0
votes
1
answer
37
views
Validation Rule Not Functioning
Below is the validation rule that should trigger when: To close this move, the Art Handler Must enter Color Temp and Light Intensity for Fine Art items moving to NG2A or NG3A.
AND(
$UserRole.Id = '...
0
votes
0
answers
107
views
Validation Rule IsChanged
I have this validation formula, which is not firing when I provide a Contract_End_Date__c prior to today's date. Otherwise for any future date it is working as expected.
AND(
ISPICKVAL(...
0
votes
0
answers
156
views
Custom validation rule - for unique value
I'm using Custom Metadata Types and writing validation rule to find if this combination has uniqueness if it's (meaning its a duplicates) then throw an error
here is what I was able to do but I'm ...
-1
votes
1
answer
78
views
Write a Validation Rule based on criteria
Write a Validation Rule on Account object of Salesforce which creates an account only when Rating is "Hot". Also, After creating the account, when we need to update it, Rating can only be ...
1
vote
0
answers
57
views
Help: validation rule (Product/Product Family)
I need to build a validation rule with the following requirements in 'Product' object:
Family Product = 'PestControl' (picklist/native)
TypeProduct__c = 'Contract' OR 'Active' (picklist/custom)
IF ...
0
votes
1
answer
94
views
How to bypass a validation rule on event creation?
I want to bypass this validation rule on new event creation and this validation is on contact object
NOT(
OR(
LEN(Linkeldin__c) = 0,
REGEX(Linkeldin__c, "^https:\\/\\/[a-z]{2,...
0
votes
1
answer
119
views
Validation Rule on Parent opportunity field by checking child opportunity field
We have Parent Opportunity and Child Opportunity Record Types with the same Delete check box field. I am trying to write a validation on the Parent Opportunity - Delete check box field. Unless a user ...
-1
votes
2
answers
158
views
REGEX Validation Rule error on blank field
I am trying to create a validation rule for a text field to only allow letters and a few special characters to be saved in the field. The special characters are " - ", " . "," ...
0
votes
0
answers
172
views
Approval Process Update conflicting with validation rule
I have a flow that automatically fires an approval process that needs unanimous approvals from three different managers. When the Opportunity enters stage 5, this before-save record triggered flow ...
0
votes
1
answer
105
views
Nested AND/OR Statement in a Validation Rule on the Case Object
I've tried following other resources, but decided to share this one to see if anyone could help me get the syntax correct:
I need to display an Error message on the Case Record when someone tries to ...
0
votes
2
answers
426
views
What is the best way to prevent a field from being editable at a certain value?
I have a checkbox that I would like to not be un-checked once it's been checked. I've accomplished this by putting in a Validation Rule.
AND(ISCHANGED(Field__c),PriorValue(Field__c) = True)
But is ...
0
votes
1
answer
150
views
Validation Rule on Pre-Chat Intake form
I'm seeking a way to implement validation for the "Phone" field within the standard Pre-Chat form. While I've successfully added a 10-digit validation rule to the "Phone" field on ...
-1
votes
2
answers
394
views
Contact Role Required on Opportunity Upon Creation
I want to have contact roles required when an opportunity is created or even marked as stage 1. However, I only want to use this on my renewal opportunity record type and not the others. How would I ...
0
votes
2
answers
202
views
How do you block a user from updating a particular field while allowing a flow to do so?
I need to allow a flow to update a record status to a particular stage, while users are prevented from doing so.
My problem is that if I set a validation rule to prevent users to update a record ...
0
votes
1
answer
76
views
Is there any disadvantage or limitations when using Custom Permssion in Validation Rule?
I just need to confirm your experienced, if there is something I need to be aware of in using Custom Permission?
We are hesitant to used the custom permission assigned to permission set to create ...
-1
votes
2
answers
49
views
validation rule to allow an upgrade of priority, but not downgrade [closed]
I have a need to have users be able to change a Priority but only if its being upgraded. Our priorities are
P1
P2
P3
P4
I don't want certain users to be able to move a case from a P1 down to a P4, but ...
1
vote
1
answer
79
views
Validation rule help - After Stage passes
I want to enforce my users to fill out two fields but instead of making those fields compolasory at the start I want to create a validation rule so when the Opportunity passes a stage they have to ...
0
votes
0
answers
204
views
How to insert REGEX line breaks in Validation Rule
The Validation Rule listed below is supposed to fire if the below criteria is not met:
For Sales Orders, enter between 6-8 digits
OR
For Delivery IDs, enter 10 digits.
Users may enter multiple values ...
0
votes
1
answer
252
views
Prevent the merge of Contacts from different accounts
I have created a validation rule to prevent the merge of Contacts from different Accounts, but I get this error:
AND(
NOT(ISBLANK(PRIORVALUE(AccountId))),
NOT(ISBLANK(AccountId)),
PRIORVALUE(AccountId)...
-1
votes
2
answers
271
views
Salesforce formula for multiple picklist values
I am trying to write a formula where if Field- 'Status' contains picklist value as 'New','In-progress' or 'Escalated' then I want to make Field - Urgency to 'False'.
Can anyone please help me I tried ...
0
votes
2
answers
1k
views
Validation Rule error message always showing on top, not under the field
I have a validation rule and it should display the error message
under a checkbox field 'Consent received to add as a Contact ?' but it is always displaying the error on the header of the page.
I have ...
-3
votes
1
answer
319
views
Create a validation that will not fire unless the amount is greater than 0
I am trying to create a validation rule that will fire when the Amount_1 is greater than or less than Amount_2 but not when Amount_1 = 0
Amount_1 <> Amount_2
-1
votes
1
answer
45
views
Validation Rule Conflicting with Process builder
I have this validation rule which locks the field of opportunity when its closedwon/lost. But it is not working as it is conflicting with a flows(which updates closewon/lost dates as today() ) saying ...
3
votes
2
answers
485
views
How to use Custom Label in REGEX function in Validation Rule
I am able to use the regex formula string directly in the validation rule and its working fine when I tested it.
AND(
CONTAINS(RecordType.Name, 'International_Lead'),
!REGEX(Phone, '^(\\+)\\d{...