Validation rules help assure entered data meets basic requirements for consistent and clean data.

learn more… | top users | synonyms

3
votes
1answer
21 views

Proper method to get validation rule into Production

I have created a "Validation rule" on "Opportunity" object in Sandbox based on my requirement. It worked out fine. Now i would like it to move into production. I just copied the validation rule ...
6
votes
2answers
80 views

Validation rule that requires a picklist value in a contact record once a picklist value in an opportunity record is selected

Is there anyway to make a contact record picklist value (Customer) become a required selection once a opportunity record picklist value (Closed Won) is selected? I ask because sales reps forget to ...
1
vote
3answers
37 views

Restrict a particular alphabet combination in a field by validation

Can I restrict ' PO Box' , ' P.O. Box' or these values alongwith hyphen or so from being entered in a particular text field on a custom field on Account?
1
vote
0answers
24 views

field validation on approve or reject for approval process

I am creating an Approval Process. Its a simple process with 2 approval steps I have a requirement where an assigned approver (user) must populate one or more fields on a record before they approve or ...
0
votes
1answer
15 views

How to perform validation “If Priority is selected as Critical or High OR Requested Due Date is less than 10 working days show a message ”

How to perform validation "If Priority is selected as Critical or High OR Requested Due Date is less than 10 working days show a message. Requested due date is populated by adding 10 business days to ...
3
votes
0answers
36 views

Changeset items diff between changeset and org

Before the new deployment status page was added, there used to be a feature which showed you the items in your changeset that are new, that will modify the existing items, or that have not changed ...
1
vote
1answer
21 views

Validation Rule Only Fires If Field NOT Blank

I am attempting to create a validation rule on a field that ensures a time is formatted correctly. This is only if the user enters a time, whereas if left blank, one is automatically generated and ...
0
votes
0answers
19 views

REST API to get validation rules NodeJS

How do we get the list of all validation rules in SalesForce through the REST API? I'm using NodeJS. I see that there are methods in SOAP API (listmetadata) which can help, but can't find anything in ...
2
votes
2answers
32 views

Opportunity product validation

I want to create a validation rule at Opportunity product to validate the following. Opp record Type – sample And Stage not equal to ‘Pending Approval’ Product or product code(item number) ends ...
2
votes
0answers
23 views

Any way to validate XML against XSD file in Apex?

Im currently using an apex class with Dom.Document to generate an XML file which then gets sent off to an external endpoint. I would like to be able to validate the XML file against an existing XSD ...
1
vote
1answer
16 views

Zip/Postal Code Validation on Lead Object

I would like to create validation on the lead object that ensures a user must enter the Zip/PostalCode in the correct sequence of characters. The Zip/PostalCode must always end with a space and three ...
0
votes
1answer
39 views

Adding a validation rule to a Javascript Button

In advance, thank you for your help. What I am trying to do is to create the following validation rule (whether it will be an actual validation or a javascript API validations, that remains to be ...
3
votes
0answers
32 views

Add Error on standard list view

does someone know how to show an error in an object's listview after a dml operation? I have written a simple trigger that prevents user to delete closed opportunity List<Opportunity> ...
0
votes
1answer
44 views

Validation Rule for Phone Numbers

I'm trying to create a validation rule for our phone numbers. Every number has 3 parts: Country Code (numerical, min. 1 digit, max 3 digits, starts with '+') Area Code (numerical, min. 1 digit, max ...
2
votes
2answers
52 views

Prevent validation from running if field rendering is set to false

I have a zipcode input field on a visualforce page. This field could be hidden (rendered = false) based on certain needs. I have the following field validation to ensure a proper zipcode format is ...
1
vote
2answers
60 views

Need Help with Validation Rule(s) on Stage Changes

Need help with validation rules: Just found out our salespeople are not required to move their opportunities stage by stage. In other words, they can go from ‘Set Meeting’ to ‘Negotiation’ and bypass ...
1
vote
2answers
81 views

Want to restrict a user from creating more than 10 records w/o RSF

I have a object where 1 user can only create 10 record not more that that. If I don't want to code (by count() we can achieve it) but is there any other way that we can count the number of records no ...
0
votes
1answer
31 views

Prevent users from adding more than one Products to an Opportunity

I would like to prevent users from adding more than one Product to an Opportunity (Number of Opportunity products must = 0 or 1) without using code. I have tried creating validation around the ...
0
votes
1answer
49 views

Trigger deployment to production shows “maximum trigger depth exceeded” error

I am deploying a trigger from a sandbox to a production org. During validation it gives me "maximum trigger depth exceeded" error for some other trigger which is not part of the change set. The error ...
1
vote
1answer
39 views

Lock a checkbox based on another field

I have a picklist on my object called Type: New / Pending / Historical when the Type field is set to: New, then I would like to prevent another picklist field from being edited. This field is ...
0
votes
1answer
42 views

Validation rules on picklist field and text field

Need help in creating a validation rule, As per the requirment,(see below) I need a validation rule that does the following: IF: Production Type = Full Production, and Version = 1, or Production ...
2
votes
1answer
86 views

Java Code to check validity (expiration) of access token using rest api

I am using username/password flow . I am getting access token . But when will that access token expires, so that I can request for new access token. i don't want to get access token with each request ...
3
votes
3answers
134 views

The input text <apex:inputtext> in a repeat (for loop) doesn't work with the validation required field

I have a custom object Team member contains four text fields First Name , Surname, location and job title and First Name and Surname is a required fields (When i create them i make them required). ...
2
votes
2answers
49 views

Three tier Validation Rule / Validation chain?

I am stumped so I hope I can present my question in a manner that allows me to get some support. I am creating a Lead validation rule that in essence is 3 tiers i.e. if tier 1 is selected require ...
4
votes
1answer
90 views

Regex to validate Credit Card numbers

I have created a validation rule on a Log Text field, to check for Credit Card number for all major companies "(VISA, Master Card, Discover and Amex for now). Here is the validation rule: NOT( ...
3
votes
2answers
198 views

How to make a field editable only if a checkbox is checked

I have a text field that is set to un-editable for all profiles. However if another field (checkbox) is checked, then this text field should become editable and required. I have created a validation ...
2
votes
1answer
107 views

Validation Rule on Lookup Field

I'm trying to validate a Lookup field so that the CONTACT I add to the field has the same CONTACT.ACCOUNT.CUSTOMID as the ACCOUNT governing the record I'm adding the CONTACT to. To be more specific, ...
0
votes
2answers
64 views

Can I write a validation rule to make a field enabled or disabled based on picklist value?

Note: in standard page layout is it possible to write a validation rule to make a field enabled or disabled based on picklist value? i have a picklist - values cycle - monthly ...
2
votes
0answers
60 views

Why does ApexPages.getMessages() return multiple Message objects for field validation errors?

I'm using a standard controller with a command button that saves a record. When one of the fields is invalid, the ApexPages.getMessages() function returns multiple messages like this: 19:36:58:445 ...
1
vote
0answers
47 views

There were custom validation error(s) encountered [Mailing Longitude]"

There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "Required fields are missing: [Mailing Longitude]". this just started ...
1
vote
1answer
67 views

Date Validation in Apex programming

I need to check that the user has given a valid date in a text box. For example if user enters 2014-02-29 it should throw an error saying it is not a valid date. I can use Date datatype but my ...
1
vote
1answer
120 views

Required field validation rule for [Billing|Shipping]StateCode with State & Country picklists enabled?

When using State & Country picklist functionality, is it possible to write a Validation Rule that targets the Billing State or Shipping State fields to make them required but only when the Country ...
1
vote
1answer
75 views

Lead cannot be converted if owner is Queue

I have validation rule where lead cannot be converted if owner is Queue, i tried different sets of validation rules but none of them works, any help is appreciated 1) AND( IsConverted = TRUE, ...
1
vote
3answers
316 views

You have reached the maximum number of 10 object references on Case

While creating a validation rule the have got this error(You have reached the maximum number of 10 object references on Case), can i have a trigger used instead.
1
vote
1answer
118 views

Validation for inputFields inside Pageblock table is not working

I am trying to do a simple validation, if qty received ENTERED is different than qty ordered, a JQuery dialog box should open. For some reason this validation is working only for the first ...
1
vote
3answers
126 views

Formula field for the Difference between 2 time values in picklists

I am very new to Salesforce and have to write a formula field based validation. I have been trying but so far haven't been able to write a correct formula. My requirement is as follows: I have 2 ...
3
votes
2answers
106 views

testing if something is null in visualforce, NOT(ISNULL())) vs. != null

Is there a difference between the two statements? {!NOT(ISNULL(variable))} and {!variable != null} What is the appropriate way to check if something is null? EDIT: What if it's a SF checkbox? ...
1
vote
4answers
94 views

Basic Validation Rule not working

I want to create a validation rule where only users with the role “UK: Institutional Team” are able to create cases record type called “Benchmark Change”. My Validation rule is; AND( ISNEW(), ...
0
votes
1answer
38 views

Validation Rule: Voiding Order

Kindly help me construct my validation rule here AND( ISCHANGED(Status__c), OR( NOT(ISPICKVAL(PRIORVALUE(Status__c),"Draft")), ISPICKVAL(Status__c,"Void") )) Description of ...
1
vote
1answer
59 views

Opportunity Validation to exclude certain Profile types

Unfortunately, I'm not able to use simple Validation Rules to do my conditional statement validation. Instead I have to use a trigger to do so. That being said, currently, I'm trying to only run this ...
0
votes
4answers
575 views

how to show the validation error below the input field in VF page

I have used the following code for the email validation and the validation is working fine but I would like to show the error like the the image. how to do that? My Code: <apex:pageBlock ...
1
vote
1answer
40 views

Validation rule assistance

I'm looking for input on how to adjust an existing, working validation rule so that it doesn't fire when the running user is a specific Profile. Here is the existing rule: AND( ...
3
votes
2answers
221 views

ISNEW() Validation rule causing triggers to fail

I created the following validation rule on my contact records: IF( ISNEW()&& ( FormAssembly__c =""&& TEXT(LeadSource)="") && TEXT(Contact_Source_List__c) ="",TRUE,FALSE) I ...
1
vote
1answer
64 views

Validation fails, but no exception generated

I have a VF page for input of a custom object. As part of the object, I have validation rules. My problem is that a failing validation fails to generate an exception. It also fails to create the row ...
1
vote
2answers
41 views

Change Opportunity's owner without validating Opportunity's fields?

I want to change Owner of an Opportunity (an owner of an opportunity left company and all his opps need to be transferred to another user). Is there any way it can be done without validating record? ...
0
votes
1answer
37 views

Validation Rule that Exempts a certain Account

I'm trying to write a validation rule that will exempt a certain Account from the validation rule. The conditions are If the Quote_Issued_To is EricSSH Electronics and the Product_NCNR = 'Yes' don't ...
0
votes
2answers
272 views

REQUIRED_FIELD_MISSING, Required fields are missing: [Last Name]: [Last Name] error

Im trying to create a visualforce page and do some validations on it. If my first name and last name are same then it should throw me an error ..or else it should insert the record.When i tried ...
2
votes
1answer
139 views

Can a validation rule error message resolve to a custom label?

Is there anyway to make the error message of a validation rule resolve to a custom label? The following url indicates that it's not possible, but I just wanted more verification: ...
0
votes
1answer
29 views

Opportunity Conditional Automation

I'm really unsure how to go about the following validation rule based on a certain condition. My issue is, If Sole Proprietor is selected from the Win Reason drop-down, i.e. ISPICKVAL(Win Reason, "No ...
0
votes
3answers
61 views

How to freeze a record once stage value got funded

I have a following validation rule for "need to allow to create opportunities and be able to update opportunities as long as the deal stage is not funded. and do not allow them to change the stage to ...