Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [validation-rule]

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

-2
votes
2answers
31 views

Phone Number validation rule [on hold]

Requirement Length should be 10 digits Only numbers should be entered no alphabets Cannot be left blank Any one please help Thank you
0
votes
1answer
14 views

Validation rule for non testing context

In Apex to separate code execution for test and non-test context we use the following method Test.isRunningTest() Do we have any such thing for validation rules i.e the validation rule should be ...
0
votes
0answers
26 views

Define Sharing Rules [closed]

How do I create a validation rule to be able to determine if the priority is equal to high that I have access to the Training Coordinator role?
0
votes
1answer
31 views

Dont want to associated contact to other objects if status is pending

i want a rule where i dont want to associated contact to other objects if contact status is pending.I am not sure how can i achieve this .any suggestion
0
votes
2answers
40 views

Validation Rule to check PRIORVALUE

I am writing one validation rule where status is Pending/In Progress and I am changing any value from record then I need to throw an error 'you cannot edit the record'. AND(OR( ISPICKVAL( Status , '...
1
vote
2answers
26 views

how to make phone field unique

i want to make phone field unique for this i have tried triggers but i want to write validation rule for this i have written something like AND( CONTAINS( VLOOKUP( $ObjectType....
0
votes
0answers
15 views

Validation rule should allow process builder to change the picklist value but should give error when done manually

I am trying to figure out how to restrict users except admin from changing one of the picklist values. e.g Users should be able to change Stage 1 to Stage 2 but not from Stage 2 to Stage 3 as that ...
0
votes
2answers
27 views

Identify existing records which fail a new validation rule

After adding a new validation rule, existing records may be 'invalid'. This causes issues for me because processes and batches will fail to update those records. How can I identify which records are ...
0
votes
2answers
40 views

Validation Rule for multiselect picklist to prevent duplicate values

I have a multiselect picklist with ten values. One of these values cannot be chosen more than once on a record.. For example, multi_sel_picklist__c = "Aa" can only occur once on a record, with no ...
0
votes
2answers
17 views

Validation Rule text field required when multi-picklist value is selected

I'm trying to have a text field required when a value is selected in Multi-picklist field IF( AND(TEXT(Environment_Access__c ) = "DevQA", ISBLANK( Business_Justification__c )), True,...
0
votes
0answers
20 views

Validation rule on Account Contact Relationship object

Can anyone please let me know how to write a validation rule on Account Contact Relationship object to hold only one primary role, contact to an Account
0
votes
2answers
51 views

Eliminate consecutive two dots

How to eliminate consecutive two dots in validation rule and 1st char should not be . [dot] example: sal..esforce - invalid sal.esforce - valid .salesforce - invalid salesforce. - valid ...
0
votes
2answers
37 views

validation on lookup object

I have lookup on account of Sell_Request__c object. I want validation on Sell_Request__c to check if account-status is Inprogress then thrown an error.but i am not able to achieve this as not able to ...
0
votes
0answers
20 views

Ability to show validation rule errors next to Stage on VF page when restricting some stage values using selectoption

Here's my vf page: <apex:column headerValue="Stage" id="stageerrors"> <apex:actionRegion > <apex:selectList value="{!opp.opp.StageName}" multiselect="false" size="1" > <apex:...
-2
votes
1answer
31 views

Validation Rule For Salesforce

I have req as follows :' There are Two Object Account and Job , Account is having a field Public Logo(Url) and Job is having a field known as Client Logo flag(checkbox). Client Logo flag can't be set ...
0
votes
2answers
34 views

Looking to prevent users from changing lead status manually as a process builder is already in place

I am looking to stop users from manually changing the lead status to both "working-attempted" and "working-contacted" as we currently have a process builder in place that automates this based on ...
0
votes
1answer
25 views

Account Validation Rule

Why is this validation rule stopping me from editing a new account that I just created 5 minutes ago? It's designed so that only XYorZ profile can create an account which works, but it wont let those ...
2
votes
3answers
98 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) ...
5
votes
0answers
32 views

Why does assigning a role from the role hierarchy page bypass validation rules? [duplicate]

I set up a validation rule that prevents our delegated admin users from creating/updating a user to not have a role. The validation rule works exactly as expected when creating/updating the user ...
0
votes
1answer
24 views

Field to pick-list selection

Hi I need a favor regarding pick-list selection. for example: I have a Location object. In Location object I have (County name) field. I created county 1, county 2, county 3. And I have another ...
1
vote
1answer
255 views

Check if string contains a number or a special character

Regex newbie here, I'm trying to create a validation rule which will restrict users from entering a number or a special characters to a certain field. This is what I have so far: !IsNew() && ...
1
vote
1answer
39 views

VALIDATION RULE not throwing error

I am trying to throw an error, when the first name, city, street is not entred for the record type selected ie: can be prospect or member. But when trying to save the member it does not throw the ...
0
votes
1answer
23 views

Validation rule to prevent all other users from changing lead status when lead is “New”

I am trying to create a validation rule to prevent users that aren't associated with the user Id profiles from changing a "New" Lead Status to any other status When I check the syntax for the below, ...
0
votes
1answer
32 views

How to create a validation rule to deny all users creating new records except one

I have a roll-up summary filed which is calculating the number of child records. If the number of child records is greater than 2 I need to deny all users from creating new records except one. I ...
0
votes
1answer
50 views

Validation rule get all picklist values

How can I get all picklist values in a validation rule? I'm looking for a suitable function but I cannot find any. What I need to achieve is that some string is among the picklist values. Please ...
0
votes
2answers
18 views

RIGHT function to get the last three characters

I'm using the following formula in a validation rule: IF(ISPICKVAL(Level_Name__c ,"Level"), IF(CONTAINS(Name,"ONE")|| CONTAINS(Name,"TWO") ,TRUE, FALSE), FALSE) How can I get the last three ...
1
vote
1answer
30 views

I want to create a validation rule which will throw an error if account created date is less than 6 months and type='Active'

i have used below validation rule ,but the issue is, it will check exact 180 days.there might be chances that there are 31 days in month and then days will be more than 180 days.Please suggest how can ...
0
votes
1answer
44 views

Forcing validation rules to work a lead is converted

I have four custom fields in a lead that are mandatory when creating an opportunity. I have validation set up that if you try to create an opportunity it blocks you from saving if you have not filled ...
0
votes
1answer
16 views

How to compare two value in contains function :validation rule

I have two value : Means of transport API ( Name) Description (Description_c) Now i want whenever a new record created : 1. Value should not be null. 2. Description contain means of transport value....
0
votes
1answer
35 views

Need to restrict the multiselect picklist

I have AccountContactRelation and role is the multiselect picklist field. Based on Type i need to show or allow users to select picklist values. EX: Role values:-P1,P2,P3,P4,P5 If type="Active" User ...
0
votes
1answer
15 views

Error message not displaying in validation rule

I created a validation rule on Date field in which I want today date or future date only and also it should not blank. This is my code: AND( BFL_Date__c >= TODAY(), ISBLANK( BFL_Date__c ) ) I ...
0
votes
1answer
52 views

Validation rule for date is greater than?

Hi I am making a validation rule to check if a billing date end is earlier than the billing date start. My syntax appears to be wrong however. My current validation formula: DATEVALUE(...
2
votes
1answer
199 views

Validation rule - created date < FIXED DATE

I'm trying to add a line to a set of existing validation rules so they only apply to opportunities created prior to a fixed date. Let's say 10/31/2018. I thought it would be pretty straightforward as ...
1
vote
1answer
42 views

Using Permission Set in Validation Rule

Currently I have this in a Validation Rule: $Profile.Name <> "System Administrator" I would like to add another condition that checks a Permission Set. I have found a solution that uses Custom ...
2
votes
1answer
55 views

Salesforce Metadata Update tools

We are looking for a tool to reactivate Apex triggers(100), Flows(20), WF rules(50) and Validations rules (1700). During data seeding in a sandbox from PROD using a famous tool had deactivated all the ...
1
vote
1answer
57 views

Unable to detect the System Admin in a validation rule error condition formula

I have a business scenario where I would like to restrict the transition to the Accepted status of the Quote object, only to the admin. For this I configured a validation rule with the following ...
0
votes
3answers
38 views

Validation is not working on multiple conditions

I have a requirement to give access to few users changes leads ownership to there names. So, I need a validation rule if they try to change ownership from other users. But it's not giving any error ...
0
votes
1answer
34 views

Validation rule for record type is not working

Below validation rule is not working. I want to check the record type contains R/O. If No only the user can edit the particular filed. AND( NOT(CONTAINS($RecordType.Name , 'R/O')), ISCHANGED( ...
1
vote
2answers
103 views

Validation rule to check consecutive characters in field

I need to throw an error if there are three consecutive characters in field value. like aaa,bbb,ccc,eee,AAA,BBB etc. I am using below condition to check but dont think this is good solution. OR(...
0
votes
1answer
19 views

need to check birthdate in Validation rule

I need to check birthdate in validation rule .If birthdate==01/01/2000 then i need to throw an validation error. I used below condition but I am getting different error Birthdate=DATE(01,01,2000) ...
3
votes
2answers
119 views

Help with formula for validation rule on user fields

I'm trying to create a validation rule requiring 3 fields to be populated for 3 profiles. Here is what i have so far. I gave up after continued syntax errors. I need both Zone Approver Fields and ...
0
votes
1answer
40 views

Help with Validation Rule for record block

AND( NOT(Star_Job_Project__c ='Technology Product Sales')) This validation rule is on Time Entry Object in which if STAR Job API - Star_Job_Project__c is equal to Technology Product Sales then that ...
1
vote
2answers
165 views

How to perform field update before a Validation Rule? (without code)

I have a requirement in which I have to check a Cases Owner before I can insert a task. It should only allow task creation on Cases with Owners which are not queues. At first, we tried accessing the ...
0
votes
1answer
20 views

Validation Rule Help Please

BMCServiceDesk__Queue__c = The Queue BMCServiceDesk__FKOpenBy__c = The Staff ____________________________________________ A. I'm trying to make it where, it does not allow Staff assignment without ...
0
votes
3answers
33 views

Restrict of updating opportunity owner

I want to restrict updating the opportunity owner. I cannot able to use the validation rule because ISCHANGED( Owner.Id ) is not working. Its giving the error like Error: The ISCHANGED function cannot ...
0
votes
1answer
164 views

Validation rule for opportunity stages

I'm looking for help with a validation rule for controlling movement through opportunity stages, based on "key fields" (setup for path) being checked or not. Essentially I just need to check are boxes ...
1
vote
1answer
7 views

Filter results in a Lookup Filter Field's search results

Custom Contact Field "Active" = Data type Checkbox. "Active" is filterable in Contact Search Layouts. If "Active" which is only a checkbox, & is a filter option in the Case>Contact Name>Lookup, ...
0
votes
1answer
33 views

How to store Currency in limits in currency field

I have a requirement where I need to store values in currency field as $2,00,000/$3,00,000. Basically, that field will be used to denote limits. I cannot do that using a currency field. WHen I tried ...
0
votes
1answer
26 views

Regex expression in Validation Rule

I have the following validation rule with regex expression. I have tested the expression working to my need but can't able save this coming up with syntax error could someone help me to get this ...
0
votes
3answers
37 views

Create an event only when contact approval status is approved

I want to display an error message when a user tries to create an event for a contact that is not approved. Is it possible to do this with a visualforce page?