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

learn more… | top users | synonyms

0
votes
1answer
14 views

Opportunity Picklist stage validation [on hold]

IF i have two object OPPORTUNITY and "ITEMS" and have Master detail relationship between them ..Lets say their is two fields ITEM NAME and ITEM CODE in ITEM Object...So my question is IF I am ...
2
votes
1answer
31 views

Regex in the validation rule

There is a field for 6 digit serial number in a record. Since the field can contain only numbers, I have created a validation rule with regex to check only numbers are entered in the text field. But ...
1
vote
2answers
27 views

REGEX Pattern for “PO BOX”

I have a requirement to create a validation rule on custom object Address_vod__c. There is a picklist field in the object,'Type'. If 'Type' value is not 'mailing' then restrict to create or edit ...
0
votes
1answer
45 views

Conditionally change background color of column using formulas on style= attribute

I have the following statement for an object, I'm trying to use highlighted columns in a pageBlockTable according to a specific value, this page gets the value of the field and set a background color. ...
0
votes
1answer
34 views

Word Count Formula

I have a text area on a form, and also a forumla field that displays the max number of words allowed to be enetered in the the text area. I want to use a formula as a validation rule, that says if ...
-1
votes
0answers
24 views

I need simple validation :Start date must be today's date or greater

My requirement: I want a validation on start date field where I can validate this field that Start date must be today's date or greater.
0
votes
1answer
36 views

Validation on Field : JavaScript regex required for Field

Following is the requirement of field value should be - else it should generate an error Format to be only 9 characters with 2 letters, followed by 6 numbers, followed by one letter e.g. ...
0
votes
2answers
36 views

Validation Rule to auto populate Date field when a picklist value is selected

I have made a validation rule below to auto populate a date field to today if picklist value is selected, but this seems to be not working: AND( Offer_Stage_Date__c > today() ) ((OR(ISPICKVAL ...
1
vote
1answer
43 views

Validation rules Account: Changing owner limitation

I am trying to create a validation rule for Account. I want to limit the capability of the user to transfer the accounts (or changing de ownerID of the Account) . I only want them to be able to ...
0
votes
1answer
32 views

Validation Errors While Changing Field

I am trying to update a field to show 4 decimal places. The field is a custom field and is a Formula(Currency). Other fields like this I went in changed it from 2 decimals to 4 with no problem. ...
0
votes
1answer
16 views

Salesforce Validations

I have a requirement like the user can edit any closed opportunity only once after the opportunity is closed . When the user try to edit the opportunity second time after the opportunity is closed it ...
2
votes
1answer
16 views

Prevent user returning from 'Qualified' Lead status value

Requirement: When users set lead to 'Qualified' I want validation to prevent them returning to any other status. I have tried the below but the validation kicks in when I am trying to convert because ...
0
votes
1answer
27 views

Nesting IF Statement in Validation Rule

I'm trying to figure out a nested IF statement for a validation rule on a custom object I've created. The goal of the validation rule is check to see if option 1 OR option 2 or option 3 is selected ...
0
votes
1answer
44 views

any way to handle validation rule errors nicely in flows

When working with a visual flow, it seems that when you get an error saving a record because of a validation rule, that the only error Salesforce will give you is: An unhandled fault has occurred in ...
0
votes
1answer
26 views

Validation rule bypasses null value

I have two percent fields in this validation rule Day_Split__c + Night_Split__c < 1 Works well when both values are entered. However, if one of them is null, the validation rule evaluates to ...
1
vote
2answers
24 views

How to validate aggregate on child records

I have an object, lets call it Bill__c, that has a related list containing Contacts. In this relation each of the Contacts can be assigned a percentage of the total fee due on the Bill__c. I'd like ...
0
votes
3answers
46 views

How can I fix my birthday reminder to support leap years?

I have created formula field name as 'Next Birth date'. Without code for leap years: ...
0
votes
4answers
40 views

Salesforce Function For Validation on Selection a value from Picklist

What function should I use for validation rule as I want a validation rule to be used if I select a value from a picklist. for example, IsChanged can be used for updating the record. I cant use IsNew ...
0
votes
1answer
15 views

What are the data validation when upload data

Wanted to see if anyone knows what rules ET use to validate email address when it imports?
0
votes
2answers
25 views

Dealing with legacy data violating validation rules

In a traditional database, constraints will be applied to all data in the database. In Salesforce, however, validation rules only apply to data that has changed. As I update my schema, I also update ...
4
votes
1answer
40 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
115 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
45 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
67 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
18 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
44 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
60 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
40 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
49 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 ...
3
votes
0answers
51 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
27 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
64 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
61 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
177 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
61 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
152 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
99 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
49 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
212 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
65 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
82 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
150 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
263 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
56 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
133 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
318 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
201 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
150 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
92 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
64 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 ...