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
1k
views
Getting error while updating record through After update trigger
I have 2 objects A and B where B is linked to A via LOOKUP relationship. There is a checkbox on object A which becomes TRUE when the stage (Picklist field) for object A is changed to "Funded", and ...
0
votes
2
answers
2k
views
Opportunity product field permissions
I'm looking to give specific user access to edit single custom field on 'Opportunity Product'.
This user should not have the ability to edit any 'Opportunity' field.
I created ‘Opportunity Product’ ...
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 ...
1
vote
1
answer
2k
views
SF field to be conditionally required based on other fields on the object
I've created validation rules to conditionally make fields required on record type 'Participant' but appears something is off as it is not giving me expected results. Please take a look and let me ...
0
votes
1
answer
2k
views
Validation rule on Email and (phone or Mobile)
Validation rule on Email and (phone or Mobile) must be field with values. I have also tried
ISBLANK( MobilePhone ) || ISBLANK( Phone ) but I get validation on both fields and and if one of them has a ...
1
vote
1
answer
2k
views
Allow users access to picklist field, based on the existing picklist value and the new picklist value
We have a specific user that can edit Account records (use has full CRED to Account object as well as edit permissions at the field level) we want to restrict them from editing the standard field &...
0
votes
1
answer
1k
views
Validation rule not working on cloning, but insert and edit works fine
I have the following validation rule that is supposed to stop user if the opportunity was created after a specific date and there is no leadsource value.
(
ISBLANK(TEXT(LeadSource))
&&
...
0
votes
1
answer
1k
views
How to restrict users from getting entered in a lookup field based on their permission set assignment using validation rules
I've a use case where Users having a PermissionSetAssignment X should not be allowed to be made owner of a custom object record by another users. I'm able to do this using a trigger but I've to make ...
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 ...
-1
votes
2
answers
670
views
create a validation rule that ensures either a single email or a multiple emails are comma separated with correct email format
I created this Regex and tested it on online regex tester.
But when I am using the same regex in salesforce validation rule then I am unable to save it due to "Error: Syntax error"
The Below ...
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 ...
1
vote
1
answer
2k
views
Validation rule on parent object that checks a field on the child for duplicates
I'm working on a validation rule for field service and I'm wondering if this is possible.
We have the Product Request parent object, and the Product Request Line Item child object. There is a field ...
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 ...
0
votes
1
answer
880
views
Can one validation rule prevent record creation and editing for particular picklist values
Trying to prevent users from being able to create the record if the field Configuration_Request_Type__c is "Feature" or "Enhancement", but also not edit the same field once record ...
0
votes
1
answer
1k
views
Validation Rule for 2 Dependent Picklists when Status = Closed
I have 2 dependent standard picklists (Fault1__c, Fault2__c) which are controlled by the same standard picklist (Secondary__c).
The reason I went down this path, is to get around the 2000 value ...
0
votes
1
answer
1k
views
Validation Rule: Multiple combines into one rule
I have three similar validation rule which I'm trying to make it into a single one: My field is a Percent
my three different validation rules are:
1.
OR(
field1__c + field2__c > 1.0
)
2.
OR(
...
0
votes
1
answer
55
views
validation rule creation
Good day,
please support me in the following requirement. I have to create a validation rule on Contact object. It should be valid only for the profiles below. It should be for insertion of Phone or ...
0
votes
1
answer
2k
views
I have a problem using UpsertData, show me an error
I am trying to insert the responses of a form to a DE, but when the information is captured and I direct it to my cloude it sends me the following error
{"message":"The function ...
1
vote
1
answer
2k
views
validation rule for text and picklist
I am working on a validation rule where I have 2 fields, one picklist and one text field.
I want to throw an error to the text field when someone tries to manually enter abc, def, xyz.
So far I have ...
1
vote
2
answers
2k
views
is it possible when checkbox checked show text field in editable otherwise show readonly
Requirement is I have a check box on Case object ISEsclated and one textfield is reason. when checkbox in not checked it's show readonly form that no one write in the reason text field and if ...
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
1k
views
How to display validation rule error message for opportunity multi line layout?
I am have requirement to display error message while adding opportunity products in multi line layout. i have created validation rule with respect to condition on custom fields which are added to ...
0
votes
1
answer
1k
views
Validation rule - account executives can't edit closed won opportunity
I need to make a validation rule for Opportunities to make sure AEs can't edit closed won opportunity stages. The syntax for the rule I made works but when I log in as an AE I can change the ...
2
votes
1
answer
2k
views
Permission Set in Validation Formula Failing
I have a validation rule on the Task object. This rule prevents anyone but users with a certain permission set change the 'Assigned To' field of a task:
AND(
ISCHANGED( OwnerId ),
NOT(ISNEW()),
$...
0
votes
1
answer
3k
views
Validation Rule for Opportunity
I'm receiving an error for a validation rule. Any help would be great! Essentially I'm trying to create a validation on the opportunity record to say that If the stage= Closed Won or Sent Membership ...
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 ...
1
vote
1
answer
956
views
Disable managed validation rules via API
I have a requirement to disable validation rules in a managed package via API.
I have tried using the Tooling API and update the validation rule object to deactivate it, but the issue is that I have ...
0
votes
1
answer
2k
views
Validation rule firing on approval process rejection
Case.Rejection_Reason__c should get populated before rejecting the case using approval process.
Looks like validation rules are getting fired.
AND(
ISPICKVALUE(Case.Status, 'Rejected'),
ISPICKVALUE(...
0
votes
1
answer
963
views
Validation rule: restrict two fields not blank
I have a validation rule and I would like to restrict the two fields(both are blank). How can i achieve this?
AND(
NOT( $Setup.User_Configuration__c.Account_Validation_Rules__c ),
NOT(OR(
$...
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 ...
0
votes
1
answer
8k
views
How do I Bypass Validation Rules for a Record-Triggered Flow?
Background information: I currently have two validation rules that I am trying to bypass in a record-triggered flow. The flow is for the Case Object. Since, record-triggered flows run in system ...
0
votes
1
answer
877
views
validation rule only one user profile can edit status when status is Approved
I have Validation Rule
AND
(
$Profile.Name <> "System Administrator",
TEXT(Approval_Status__c) = "Approved"
)
I need that only System Administrator can edit Receipt when ...
0
votes
1
answer
1k
views
Apex is throwing error but LWC is not catching and displaying the correct Toast message
I have created a validation rule on Order Product Object, it is working as expected on the record page. While making changes from LWC, error message is not shown, instead a success message is showing ...
0
votes
1
answer
1k
views
Validation to only allow user to change status if current status is A and only allow to change to status B
I'm usually pretty great at writing validation rules but guess this Monday isn't off to a great start. I'm trying to write one with the below criteria and I'm not getting anywhere.
Any help would be ...
1
vote
4
answers
2k
views
To display a prompt notification (Lightning design system)
The input field takes in a name and on the click of the 'submit' button, it saves this new account name.
But if the input field is empty, then the program should display a prompt which says "error"
...
1
vote
1
answer
1k
views
Certain profile user shouldn't be allowed to create record of custom object thru 'NEW' button on HOME page
I have a requirement for a custom Object, when user with certain profile (For example Sales) will click on "New" BUTTON (mentioned below is the screenshot of the same) then it should display error ...
0
votes
1
answer
1k
views
Trying to Bypass Validation Rule within Flow
I am trying to bypass a validation rule on the Opportunity object from within a Flow. I have attempted this using the 'Toggle' technique as seen here: https://admin.salesforce.com/blog/2022/how-i-...
1
vote
1
answer
953
views
Validation rule that limits what products to add to opportunity by oppRecordId not showing error
I have a validation rule on the Opportunity Product object...it's the only one that i could reference the Opportunity object and the Product 2 object.
AND(Opportunity.RecordType.Name = "Happy Fun ...
0
votes
1
answer
1k
views
How can I prevent users from updating the status to anything but closed?
I am trying to prevent a customer from updating the status of a case to anything other than closed with a validation rule. What I have works when I update the status, but also for closed. Here is ...
0
votes
1
answer
1k
views
How do I use standard object Validation Rules in a Lightning Component?
I'm still learning how to use Lightning Components and would appreciate help. I have several Validation Rules on a child object. There is an action on the parent object which uses a Lightning ...
0
votes
1
answer
931
views
Where can I find standard validation rules?
In a developer org, although validation rule lists are empty, checks are performed against data. E.g. trying to create an Entitlement record may lead to an error "The number of Remaining Work ...
0
votes
3
answers
6k
views
Bring validation rule to VS Code project
I am new to Salesforce and I have a question regarding to my first real task so I don’t make nothing wrong.
I have created a new validation rule in my sandbox and I want to bring this to my Visual ...
-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 ...
1
vote
1
answer
1k
views
How to compare multiselect pick list with another picklist?
I have a multiselect picklist on User object and a picklist on Case object. I am trying to write a validation rule so that if picklist value selected on Case is not matching with one of the ...
-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 ...