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

learn more… | top users | synonyms

0
votes
2answers
16 views

Validation Rule Issue - Why won't this work?

I've been trying to figure this out and cannot get it to work. I've tried the following combinations and nothing I do gets it to trigger. We have a lookup field that looks up to the Sales Order ...
3
votes
0answers
31 views

Count Line Breaks?

I am trying to count the number of lines in the BillingAddress field. I am familiar with the following methodology to count the number of times a substring occurs via formula: LEN(TextField__c) - LEN(...
0
votes
1answer
25 views

Validation according to user role

This is not working according to User role any one please suggest AND( OR( $RecordType.Name = "Helpdesk", $RecordType.Name = "Tagged Helpdesk", $UserRole.Name <> "RECO ...
0
votes
1answer
27 views

Prevent task deletion by anyone other than task creator

I need to create a trigger that will prevent the deletion of a task by anyone other than the creator. I don't know about writing code so I'm hoping someone can help me out with this. It would be an ...
0
votes
1answer
18 views

Make picklist field required based on another picklist field

IF A(picklist fild=X and B(picklist field=) Then Return_Type(picklist) and POD_request_status__c(picklist) can not left as blank.
4
votes
1answer
236 views

Prevent user from editing or deleting a validation rule

I have a validation rule on Account object that prevent users, belonging to certain profiles, to edit a field. There is no issue with validation rule. Problem is, when I login as the user who is ...
0
votes
1answer
26 views

How to make a field mandatory based on multiple fields

I have 6 fields, 3 of which are picklist and 3 of which are text fields. If any of these fields are not null or blank, I want make another filed mandatory. I tried a validation rule with or condition....
0
votes
2answers
42 views

Prevent Inline Edit

I have an issue here. I have an object O1 and a field F1. Field F1 is getting updated when an record is created in another object O2 by a trigger running on object O1. Field F1 cannot be edited by ...
0
votes
1answer
36 views

How to prevent user saving duplicates values

EDIT: Should be only allowed in A and B field as unique values for an example: Valid entries are follows: field A: 1 field B: 5 field A: 6 field B: 10 field A: 11 field B: 15 Invalid entries ...
-5
votes
2answers
38 views

Validation Rules on Opportunity object

I would like to restrict a user from moving an Opportunity stage to Closed Won if a checkbox field called Total Spend is unticked.
1
vote
1answer
27 views

Avoid Duplicate Names of Account using Validation Rule

How to Avoid Duplicate Names of Account while Creating or Editing the Account Record using Validation Rules
0
votes
2answers
29 views

Question regarding validation rules

I have a junction object(volunteer hour) between volunteer job(custom) and contact(standard). whenever i try to save a record in volunteer hour, system triggers a validation rule of volunteer job. is ...
1
vote
1answer
41 views

comparing checkbox with child record's checkbox field

I have 1 custom object "Address" having master detail relationship with contact object in salesforce. I also have one checkbox field on both of the objects. The requirement is to have checkbox checked ...
3
votes
2answers
210 views

Validation Rule to prevent editing record

I have the following validation rule: AND( $Profile.Name <> 'System Administrator', OR( ISPICKVAL(PRIORVALUE(Level__c), "Archived"), ISPICKVAL(PRIORVALUE(Level__c), "Closed") ) ) This ...
-1
votes
1answer
66 views

Make field required on condition [closed]

We have 2 fields: One is a picklist (Final Status), and another is a multi-picklist (Condition for relisting). We want to make Condition for relisting required based on the value of Final Status.
-1
votes
0answers
18 views

Validation Formula

There seems to be 3 answers in this Question but yet only A & B is correct, why D isn't falling into the category right answer? Please enlighten me. The VP of Sales wants to ensure that the ...
0
votes
1answer
24 views

validation rule making a field mandatory only if created after specified date

I want to make a field mandatory only on records created after a specified date. So if the opportunity created date is prior to current date then field wouldn't be mandatory but if opp. created date ...
0
votes
2answers
20 views

Validation Rule - either both entered or both blank

I'm trying to validate to allow either field1 and field2 both be populated or both be blank. I have tried this formula but does not seems to be working: IF( NOT(ISBLANK(field1__c)), NOT(...
0
votes
1answer
24 views

Validation rule to compare the queue name with a Custom object field

I need to create a validation rule to compare the text field value (which is input type) with the Queue list present in my org and if the Text field value is not present the into the Queue List then ...
3
votes
1answer
41 views

When creating an EventRelation of a public calendar validation does not function as expected

I'm using Process Builder and Visual Workflow to sync a custom appointment object and its "Room" selection picklist with the public resource calendars we set up for our conference rooms. Here's how it ...
0
votes
2answers
60 views

Validation Rule for Phone Number that should only contain numbers and +

I'm trying to create a validation rule for Phone Numbers. Say, I have three Phone Number fields that should be checked if the values meet the following requirements: phone numbers should be 10-12 ...
0
votes
2answers
28 views

Help with Validation Rule

I need to write a Validation Rule that states: When a user manually tries to change or update the value of Stage on Opportunity object it should throw an error. On opportunity there exists an Approval ...
1
vote
1answer
16 views

Record read only based on field create/update from external system [closed]

We have SFDC - Employee Integration with external HR System, Question is when we receive back the ‘Employee Identifier’ from HR System, I need to make the employee record read only? pls suggest ...
0
votes
2answers
44 views

Help required in building formula for validation rule

I have 3 objects Contact(standard), Volunteer job(custom) and Volunteer hour(custom). Volunteer hour is a junction between contact and Volunteer job. Contact has a custom picklist field 'status'. my ...
8
votes
0answers
54 views

State & Country picklists - importing leads with states for countries without states enabled

Tell me that I'm wrong but it would appear the State and Country picklist feature makes it impossible to integrate / import Leads with state values from countries where you are indifferent to the data ...
0
votes
0answers
23 views

Include a string in REGEX

I have below error condition formula active in a validation rule. Formula AND(OR(REGEX(Name,".*(?i)(p[. ]?o([. ]?|st[ ]?office))[. ]?box.*")), NOT(ISPICKVAL(Address_Type_abv__c,"Mailing"))) String ...
0
votes
1answer
63 views

error when trying to approve request

hello i created a trigger who auto submit the approval request into the approval process. when i create opportunity with the entry criteria of the trigger and the procces i get to approval requeset if ...
3
votes
1answer
51 views

Exempt Visualforce Page From Validation Rule

I have the following Validation rule Active: Error Condition Formula: ISPICKVAL(First_Ranking__c , "") When I try to submit the visualforce page I'm getting the validation error asking to select. ...
4
votes
3answers
140 views

Validation rule is not working as expecting

Hi i got a requirement like create a validation rule based on probability. The requirement is user cannot modify some custom field called forecast units If probability is under 70% So, i write a ...
3
votes
2answers
62 views

How to make field disabled using validation rules

I have two fields checkbox and a textbox field, if the user clicks on the checkbox checked than I want to enable the textbox field otherwise remain disabled. I'm not sure if this is possible using ...
1
vote
1answer
34 views

Disabling Validation rules?

I'm not sure disabling validation rule is the only way out for this particular scenario but you guys can chime-in ideas how to approach this particular issue. I have the following validation rules on ...
0
votes
0answers
23 views

Workflow is not working as expected

Hey i got a scenario like i have a custom field called Demo date in custom object. So i got a requirement like user had to select date only once.If they try to modify they will an error. So for this ...
0
votes
2answers
54 views

Validate that a URL begins with

I do not find anyway that you can validate a valid url when the user enters in the standard page so I come up with this validation and I need little help to fix it. I'm using BEGINS to see if the url ...
0
votes
1answer
21 views

Validation on Dependent Field in Standard Page

How would I go implement validation on a standard salesforce page? The validation rules are: I have the following: 1) Attachment - Checkbox (default checked) 2) URL - Textbox If the Attachment ...
1
vote
1answer
37 views

Displaying error message besides the field responsible for occurrence of error from Apex code

I am trying to display a form that creates multiple Contact records from my Visualforce Page. I don't want to use inputField to achieve the same. The requirement is that if I do not enter LastName ...
1
vote
2answers
48 views

Prevent validation of a specific required input field when button is clicked

How can a commandButton ignore validation for one particular required field? I am working on a seemingly simple portal account page with the following markup: <apex:page standardController="...
6
votes
2answers
56 views

Forced execution of validation rules?

Is there a way to force execution of all validation rules? Ultimately, I'd like to test an oppty against VR's, just as if you Edit/Saved, but without modifying its timestamps. That way I can see how ...
2
votes
1answer
90 views

Task email notofications

If we assign a task to someone else, we can get an automated notice when the task is completed. For that i have written one trigger mentioned below that trigger is working fine but email is being ...
2
votes
1answer
106 views

Bypassing validation rules while updating object by apex trigger

I have validation rule on a date field that 'Start Date shouldn't preceed today'. I have an trigger which updates another field of the same object. Now when trigger runs on old records field ...
0
votes
1answer
37 views

Use AddError() inside an Apex Class

Is there any way that we can use addError() inside an apex class? I know it will work properly inside a trigger. But i would like to have a separate class for all validations instead writing them ...
0
votes
2answers
30 views

Help with the Validation Rule on Custom Object

As per the standard functionality in Salesforce, when we hit Enter the record is saved automatically & we are directed to the detail page of the record. But I want to restrict the user from doing ...
0
votes
1answer
34 views

Validation rule not working

I have few scenarios When ever stage picklist - Support selected and saved, it should not save if any of the fields address,state,city are blank There is a check box, if it is enable to true then ...
1
vote
1answer
38 views

Setting a validation rule on a custom object date

Hi I`m trying to implement a validation rule in a custom object with reference to another custom object. Both are date-objects. I tried the following Code. The syntax is correct according to ...
1
vote
1answer
40 views

Custom controller, default object values, and validation. How can I get all three to work in harmony?

I have a Visualforce page that is backed by a custom controller. The custom controller has a public property of type Event (called ThisEvent) that the Visualforce page uses to bind to several input ...
-1
votes
1answer
63 views

Apex:pageMessages Only Displaying First Error on Visualforce Page

I have a visualforce page in which I have set many inputFields as required. When I click save and if no values have been entered for the required fields i do receive an error message Error: You ...
3
votes
2answers
39 views

Why are my validation messages not displaying on my Visualforce page?

I have a Visualforce page with a custom controller. Whenever there is a validation error on saving, the user is shown a white page with the text SObject row does not allow errors: I have followed ...
0
votes
2answers
36 views

Combine two validation rules

I have two validation rules. I'm not able to use this validation at a time. I want to combine these two validation rules into one. One rule Accept lead owner as user. When lead owner is set to queue ...
1
vote
4answers
44 views

Date Validation?

Below is the validation rule which I have written: AND( BRP_Unconditional__c = true, NOT(OR(DATEVALUE(CreatedDate) < DATE(2016, 20, 3), Web_Form_Source__c = "goldrush.oliverhume.com.au", NOT(...
0
votes
1answer
32 views

Logged in user can only edit the record they relate to. Validation Rule

Is there a way to retrieve the current user in a validation rule? The logged in user will be logging in from a community. Need to make the record only editable if the Logged in user matches the ...
1
vote
1answer
42 views

Unable to choose correct picklist value

I have a problem that in my validation rule. I have a picklist field called "Status". It contains value like,"Progress,Completed,Won,Lost". If picklist prior value is "progress", then i want choose ...