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.

1
vote
1answer
25 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
21 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
10 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
32 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
12 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
0answers
12 views

Validation Rule or Formula

So basically I want to add my custom object in the opportunity page layout along with the Quantity, Price, etc.. Is it possible to show my customobject in the pagelayout when I select my product(...
0
votes
1answer
25 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
68 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
24 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
53 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
50 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
33 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
32 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
71 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
18 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) ...
0
votes
0answers
15 views

how to limit child records to 5 per day based on master field selection

There are 2 Custom objects Passport_Slot_Availability__c and Passport_Booking_Appointment__c.They both have master detail relationship. where Passport_Slot_Availability__c is master and ...
3
votes
2answers
116 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
32 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
122 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
19 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
32 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
51 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
30 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
23 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
36 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?
0
votes
4answers
31 views

How to skip Required fields upon auto-creation of an object record?

I have this situation where I want to create a record on the ACCOUNT object and only when my custom field in ACCOUNT called 'Account status' is changed from 'new' to 'prospect', then it should auto-...
0
votes
1answer
20 views

validation rule on two pick fields based on values

I have two pick list fields product__c and Assigned_group__c I am trying to write a validation if value on product__c picklist is DR user can only select L2 value on Assigned_group__c picklist and ...
2
votes
1answer
23 views

Validate Rule Doesn't Throw Syntax Error But Doesn't Throw Errors Either

I'm trying to run an Account Validation Rule where if the Account Status Equals Closed, Users cannot update the Account. System Admin Profile is allowed to edit. There aren't any syntax errors on ...
0
votes
2answers
94 views

Validation rule on multiselect picklist

I have a requirement - Create a multiselect picklist field on account Named - Area and add to the page layout There is a field on opportunity called pricebook and it is a lookup to Pricebook ...
0
votes
0answers
81 views

Validation Rules to prevent record edit/creation

Wondering if anyone can help me modify the existing validation rule formulas to meet some extended criteria? Project custom object validation rule: TEXT(PRIORVALUE(Status__c)) = 'Completed' ...
0
votes
1answer
60 views

Notes & Attachment + Validation Rule?

I need help building a Validation Rule to make sure "Notes and Attachments" are required before continuing to next stage. At least 1 attachment should be attached before the user can proceed to the ...
0
votes
1answer
27 views

Lock Opportunity Contact Role record

Since the OpportunityContactRole object is not a first class object you cannot create a trigger on the object, nor add fields or create a validation rule. Is it possible to prevent the deletion of an ...
0
votes
1answer
25 views

How to avoid showing “Save Success” message when there's an error message in visualforce page

I've a VF page which creates cases. It has lot of validation rules, workflows and approvals associated with it. When a user enters details to edit a vf page which is in approval process (user is not ...
0
votes
2answers
69 views

Validation rule Preventing Process Builder Field Update process

I have Two business requirements 1) Leadership team asked me to prevent updating of Sales Stages manually 2) Sales Stages should be updated as result of Logging of Activities So, I came with ...
0
votes
0answers
12 views

Lock record from approve/reject for current approver if the case is cancelled

Our case functionality involves multi level approval process and has the following status values: Initiated Level 1 Level 2 Level 3 Closed Cancelled There's a checkbox field, when unchecked ...
0
votes
1answer
105 views

Regex validation for Phone Number

I am trying to create a validation rule for US format number and using the following regex Validation NOT(REGEX(Phone, "\\D*?(\\d\\D*?){10}")) The above seems like a standard regex which will only ...
2
votes
2answers
136 views

Formula field to get records created this week on activities

I have a requirement where a checkbox is to be checked if a record is created by a specific profile this week on activity. So, I got the following formula: IF(CreatedBy.Profile.Name = "Territory ...
1
vote
1answer
32 views

Validation Rule for Number only in Salesforce is throwing an error for (XXX) XXX-XXXX format

I have 3 phone fields in Salesforce Contact. I am supposed to prevent users from entering characters in the phone field. I have used the below validation rule ( Phone != null && ...
0
votes
0answers
29 views

Validation rule to select a picklist value ONLY if picklist is clickable (Not greyed out)

i need to write a validation rule which makes sure that the user must select a value of a picklist that is dependent on another field. Problem here is that for some values in the controlling field ...
0
votes
0answers
70 views

Parent Validation Rule triggers in Child Record Creation causes Error

Hi I have an issue where in when I create a QuoteLineItem, it triggers a Quote validation rule. Which is fine but the error message is different. It should trigger the validation rule message ...
0
votes
1answer
33 views

How to tell which Validation / Workflow rule caused exception?

I am using a batch class to mass change the case owner from one queue to another, but during the update process I am returned the following exception: FATAL_ERROR System.DmlException: Update failed. ...
0
votes
1answer
164 views

FIELD_CUSTOM_VALIDATION_EXCEPTION: Attempt to de-reference a null object

I'm facing a weird issue in our customer org. We try to update some lead objects in our managed package after some processing. We are seeing that sometimes the objects are updated successfully whereas ...
0
votes
1answer
24 views

Prevent users from creating event of particular record type from opportunity object

I want to pop up error whenever a permission set user tries to create an event of B type from an opportunity? Event has two record types A,B But the user who has permission set assigned Should not ...
0
votes
1answer
19 views

How to prevent a field from updating with a Valadation rule

I am trying to prevent a field on the Account object Servicing_Platform__c from being changed. Only profiles who can change it are Salesforce Administrator and System Administrator. This field is ...
2
votes
3answers
121 views

Is that possible to write a validation rule that would allow to update only two fields of 800 on a custom object record?

My colleague asked me today an interesting question I never thought of before. Is that possible to write a validation rule that would allow to update only two fields of 800 on a custom object? I know ...
1
vote
1answer
49 views

Picklist values in a formula on a validation rule (along with text fields)

I have a validation rule on the contract object which doesn't allow a checkbox to be checked by users until they have completed the required fields. The issue is that some of these fields are picklist ...
1
vote
1answer
63 views

Validation rule to allow modification of limited fields only

I have a object that has more than 40 fields. There are 3 record types and each layout shows different fields. Now, I want to write a validation rule which allows editing of limited fields only when ...
1
vote
1answer
41 views

Validation rule not firing if there are empty spaces in Long text area field

I have a validation rule that should fire whenever there is a value on field 'A' and the 'description' field Long Text Area(32000)) of case object is left blank. This rule fires for manual cases but ...
2
votes
1answer
29 views

force an opportunity to always have the same contract

Currently our salesforce users are changing the contracts of the opportunities. We automatically create a contract and do some maintenance on the contracts so we do not want anyone to replace the ...