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

learn more… | top users | synonyms

1
vote
2answers
21 views

Lead conversion unit tests throw errors for validation rules that use custom settings

I'm running into an odd issue with some of my unit tests & can't seem to find out what exactly is causing it the problem. Several of my unit tests revolve around converting a lead to an account ...
2
votes
1answer
15 views

Validation Rule to Restrict Users from Changing Ownership (if they're the owner)

I have created this validation rule to restrict users from updating account ownership if a record has a Ship to ID populated that starts with a 6 or 7 unless you have an admin or IT user profile. We ...
0
votes
2answers
17 views

How to add a validation rule in the scenario?

I have a checkbox field chk_A on Account. I want to make sure that at least one of the children Contact's checkbox field chk_B is checked that chk_A can be checked. Can I loop the children Contacts ...
0
votes
0answers
10 views

Can't update Field A due to unrelated validation error on Field B

We provide a managed package on the AppExchange which includes a sync process where we update fields belonging to the managed package, via the BULK API. Frequently this fails for customers due to ...
0
votes
1answer
22 views

Validate new record against existing records

So I have a custom object called properties Properties has a master detail link to a person account, and there is a field called property type. I only want to be able to assign one property type per ...
0
votes
1answer
12 views

Opportunity StageName from Closed Won to Closed Cancelled

Got an error condition formula below: AND( ISPICKVAL(PRIORVALUE( StageName ), "Closed Won"), OR( ISPICKVAL(PRIORVALUE( StageName ), "Closed Won"), ISPICKVAL(PRIORVALUE( StageName ), "Commit")), ...
2
votes
1answer
29 views

Can I make Account Owner read only?

This is my issue Users assigned to a particular profile who cannot change the account owner. I went into the profile to set OwnerId to readonly and cant do it at profile level for some reason. ...
0
votes
1answer
18 views

Is it possible to use a Validation Rule to enforce a text field begins with certain characters?

For example, when creating Campaigns, I would like for each Campaign Name field to begin with "FY" - thank you!
0
votes
1answer
8 views

Restrict tasks logged by user to a particular type

We are required to restrict a particular profile from logging tasks on any other object but the case object. I see i can use what.type in apex code, but i am trying to evaluate use of a validation ...
5
votes
1answer
55 views

Phone Field in Custom Object

When I add Phone field in custom Object, I want to the user to enter minimum of 10 digits, if the user enters less than 10 digits they should get error [Just the numbers, no need of any special ...
2
votes
2answers
31 views

Account Validation Rule That Exempts Specific Profile IDs

I'm hoping to create a validation rule so that Once a Ship To ID (custom field on account) exists that starts with "6" or "7" users cannot change the Account Name with the exception of if you are a ...
0
votes
1answer
19 views

Opportunity Validation Rule on Primary Campaign

I must be going crazy. On an Opportunity I want the Validation Rule to trigger when no Primary Campaign has been selected. This is a Standard Field on the Opportunity so the rule I set up is ...
0
votes
0answers
32 views

Closed/Lost opportunity stage match with Omitted forecast category

Time-based Workflow on opportunity Object. As per our workflow criteria when 'Closed date and Reservation End date equals today's date and Reservation Flag is true' the workflow fires and updates 2 ...
2
votes
1answer
54 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
37 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
100 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
42 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 ...
0
votes
1answer
58 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
71 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
57 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
43 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
19 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
56 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
74 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
31 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
27 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
66 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
49 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
16 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
30 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
53 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
131 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
56 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
94 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
45 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
98 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
50 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
57 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
61 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
31 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
76 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
73 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
257 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
65 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
189 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
109 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
56 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
305 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 ...