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

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

1
vote
1answer
40 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
29 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
27 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
50 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
15 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
12 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
106 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
23 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
88 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
18 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
29 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
19 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 ...
0
votes
1answer
5 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
29 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
22 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
35 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
29 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
17 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
20 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
45 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
27 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
30 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
25 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
21 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
40 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
11 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
34 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
92 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
22 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
25 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
46 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
23 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
103 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
23 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
18 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
120 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 ...
0
votes
1answer
26 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
47 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
34 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 ...
0
votes
0answers
38 views

Multiple Validation Rules on a single field to be merged as one

Unknowingly there are 2 validation rules created for a single field and here are the rules. Rule1 : AND( ISPICKVAL(tesname__PotentialLiability__c, "Yes") , NOT(ISBLANK(tesname__Due_Date__c)), ...
2
votes
3answers
111 views

Validation rule to allow certain numbers

I am trying to write a simple validation rule and for some reason i am just not getting it right. Here is what i want to do If recordtype = Franchise, then i need to allow only the foll. numbers in ...
0
votes
0answers
25 views

Validation rule not thowing an error in sf1 app

I am having a strange issue. I have created a validation rule on Contact object. The rule shows an error message when someone tries to update a closed contact. Closed value is contained within a ...
0
votes
0answers
31 views

URL Hacking not null validation rule in custom button

I have created 'Create Oppty' button on custom object License. Which is pre-populating some values on Oppty from License. I want to add one validation rule in this button like : Quantity != Blank....
0
votes
2answers
84 views

Validation rule to allow 15 digits only

Please advise a validation rule to allow me to enter 15 digits only. If the number of entered digits is higher or less than 15 the validation rule should display an error message. If there are ...
1
vote
2answers
217 views

Why do we disable validation rules and triggers while Data loads via loader

I'm trying to understand why do we disable validation rules and triggers while loading data via data loader or other tool. If we not disable, what will happen in the system level?
0
votes
0answers
45 views

how to write validation rule for child object on basis of parent object by lookup relationship?

I have two objects, one is event and other is attendee. Attendee has to select event in the form of lookup relationship. Event has two types of ticket, general and vip. Attendee won't select vip ...
-1
votes
2answers
47 views

What are the ways by which we can bypass validation rule? [closed]

I wanted to know What are the ways by which we can bypass validation rule?
0
votes
1answer
50 views

Validation rule on a custom button to fire if not all fields are filled by the user and not allow user to move on

I have a custom conga sign button that sends out the contract, but we want a validation rule on the button so that the user cannot send the contract until all of the fields have been populated. ...
2
votes
1answer
84 views

Validation rule to prevent a profile user to edit a record in certain case

I have setup a validation rule to prevent any user with a particular profile(Worker) not to edit the record except the status field. This record is of Case object. I wish to allow the user to update ...