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

learn more… | top users | synonyms

1
vote
2answers
27 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 ...
5
votes
1answer
43 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
47 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
70 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
22 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
28 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
28 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
37 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
27 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
35 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
29 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
30 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 ...
0
votes
4answers
39 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", ...
0
votes
1answer
22 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
41 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 ...
3
votes
2answers
202 views

Resource is inserted even thought it has a conflicting schedule with another event

I am using standard Public Calendars and Resources where I have 2 types of resources, Vector Unit and Demo Unit. Now if any of the resources have a conflicting schedule, a standard Salesforce error is ...
1
vote
0answers
23 views

Resource validation firing incorrectly

I have 2 resources, Vector Unit and Demo Unit. I am creating an event with these Resources which is the standard Public Calendars and Resources. I am putting all the resources and its Ids in a Custom ...
1
vote
2answers
31 views

Text field validation rule

In contact object I have a Title field as type text. If anybody enters a number in this field, it should throw an error. How can I achieve this with avalidation rule?
2
votes
1answer
71 views

Validation should not fire for a specific user

I have a requirement where a certain field can be edited without the validations firing for a particular user. Now I tried to write rule like LastModifiedId != '005000000000000AAA' but the validation ...
1
vote
1answer
23 views

Fire validation rule while opportunity stage change

I want to fire validation rule when opportunity stage is moving from Customer Intake to Opps Planning. When opportunity stage change it should check that Account.Mask_Manufacturer_Model__c is not ...
0
votes
1answer
16 views

apply validation on mailing address on contact object but given Error: Syntax error. Extra ','

ISBLANK ( MailingCity), ISBLANK ( MailingCountry ), ISBLANK ( MailingPostalCode ), ISBLANK ( MailingState ), ISBLANK ( MailingStreet ) if any field like city , country , postal code, state, street ...
0
votes
4answers
37 views

Validation Rule Issue

been going around on this. Can anybody spot whats the issue? I'm just trying to get a validation rule to work. Basically, if someone select a certain option in a picklist, I want to make sure that all ...
1
vote
1answer
29 views

Any standard functionality to popup error message on validate fields

I want to validate three fields and any one of them is not satisfied, after click on the button, should fire one dialogue box with error message. Is there any standard functionality to achieve this?
0
votes
1answer
25 views

Field Validation Rule for Location

How to Lock Location Field on a Custom Object Country. The requirements are to be able to create NEW LOCATION field or Populate the Location if it's NULL upon creation the FORM. But wouldn't be able ...
0
votes
1answer
26 views

Show alert on validation rule

Can you show alert message on standard page layout? when user change the lookup value and try to save? here is my scenario, I have a lookup on a standard page layout and when the user change to any ...
6
votes
2answers
119 views

Number Field - Limit Four Characters - Validation Rules

I'm having trouble enforcing a minimum character requirement on a Salesforce number field (using Validation Rules). I can get the limitation to work on a text field using: AND( ...
1
vote
1answer
39 views

How to do validation on visual force page

here i am trying to do validation here but i don't know how to do that on the following vf page- Validations: a. If Product Type is New, please populate the Service Start Date and the Full Revenue ...
1
vote
2answers
71 views

Visualforce input validation best practices

I have multiple Visualforce pages with inputText that needs to be validated that: Correct datatype Correct length Regex (ssn, phone number) What is the best way to do the validation? ...
0
votes
3answers
75 views

Validation on Landing Page

I want to do a very basic validation on the Smart Capture form on the landing page. I used AMPScript to do the same like below - %%[ SET @lname = RequestParameter("LastName") IF Empty(@lname) ...
1
vote
1answer
23 views

Validate Contact name on Quote object

How do you validate if the Contact name field is left empty or not on Quote? I do see that, its a lookup field and using the code as below on trigger always return false. for (Quote objQuote : ...
0
votes
0answers
25 views

Validate rule (VR) Competitor field is not equal to 0 and associated with multiple stages of an opportunity

Using rollup summary field pointing to a related list, need to validate 5 of the 8 stages to be sure that there is a value in the related list. The related list formula field is working correctly, ...
2
votes
1answer
46 views

how to compare three date fields in validation rule

i was trying to compare three date fields in validation rule and i used this formula And( (Start_Date__c < Revision_Date__c) , (Revision_Date__c < Close_Date)) Close date is a standard field ...
0
votes
1answer
72 views

Validation Rule on Phone Field to allow only Numbers or Blank

I wanted to write a validation rule for default Phone field. AND( NOT(ISBLANK( Phone )), NOT(ISNUMBER( Phone )) ) it works fine but allows only 9 digits. What could be the problem? When ...
0
votes
2answers
36 views

Add a Validation To Custom Button on Standard Page layout

I have a custom button on a custom object, which redirected to a VF page via URL content source. But I only need to run it based on certain field value of my custom object. So without going to a VF ...
0
votes
0answers
16 views

Validation Rule : Distinguish between user point-and-click actions and user connected from API

I want to create a validate rule that prevent user from choosing a particular picklist value. However, I need to authorize this change if it is carried out using API (web service that updates this ...
2
votes
1answer
48 views

Unable to figure out this validation rule for currency field entered and text field not

I am struggling with this validation rule, and I cannot figure out why. and( not(isblank(Submission__c)), isblank(Submission_Comment__c)) Submission is a currency field and Submission Comment is a ...
5
votes
4answers
473 views

Make contact firstname and lastname mandatory

This is a generic question. I was trying to make the first name and last name field of contact mandatory. Currently only the first name is mandatory. I tried doing this from the page layout. Now I ...
-1
votes
1answer
56 views

Prevent deletion of detail record if master record is 'submitted for approval'

I have two objects called opportunities and TEST__c. master objects is opportunities and child is TEST__c. I need to prevent edit and delete of TEST__c record once opportunities record are submitted ...
0
votes
2answers
44 views

Validate a Case has a Task before allowing it to be closed

Since rollup fields for Tasks aren't available I need an apex solution to count the number of related Tasks on a Case before allowing the Case to be closed. This seems like it should be a fairly ...
1
vote
0answers
15 views

Migration tool took more than the expected time to finish the deployment

Validations and deployments via migration tool to a sandbox took more than the expected time to finish the deployment. Total deployment/validation time supposed to be roughly 30 minutes and suddenly ...
0
votes
3answers
41 views

Regarding validation rule and test code coverage in salesforce

For validation rules can we write test code coverage. if that so all the validation rule test code coverage can be maintained in one class? Thanks, Gayathri
0
votes
0answers
31 views

How to validate a Logic Filter input Text

I need to implement a Logic Filter Text field in my VF page. The value of the input field can be anything, like (A AND B) OR (C AND D) or A OR (C AND B) etc. I have 6 filter fields. I would like to ...
0
votes
1answer
29 views

Detect if related list exceeds a specific number

I have two related objects example Teacher and Student. Inside my parent object Teacher I have a field maximum_number_of_student.What I want is that if I add a new student the code will check if I ...
0
votes
2answers
38 views

display fields from table and display as a textfield,with condition

I have fetch the data using query from apex.from two obeject with look up relation query is setCon = new ApexPages.StandardSetController(Database.getQueryLocator([SELECT ProgramName__c, ...
1
vote
1answer
46 views

How to ensure that article manager use specified values for custom article fields?

How do I ensure that the article manager uses specified values for custom article fields? Which of the following options I should implement? validation rules on article object Make fields required ...
0
votes
1answer
35 views

understand REGEX Meaning

there is a validation rule, that i don´t fully understand, so can anyone please help me to understand the meaning of the REGEX credentials in the formular NOT(REGEX( BillingCity , ...
1
vote
1answer
35 views

help with a validation rule

AND( NOT( OR($User.ProfileId="00e30000000geag", $User.ProfileId="00e50000000vKto", $User.ProfileId="00e50000000z2H8") ), ISPICKVAL(PRIORVALUE( FAI_Status__c ),"DNS") , ...
6
votes
1answer
81 views

NinjaValidationException

I encountered the following exception when trying to insert a CollaborationGroup in a test: System.DmlException: Insert failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, ...
1
vote
0answers
32 views

Debug logs for Change Set Validation

I can't seem to get debug logs working for Change Set Validation in PROD. I have checked in the regular Debug Logs section and the Developer Console. They don't show up. The debug logs show up for ...
0
votes
0answers
93 views

How to show Error message and stop page postback in Lightning Component?

Is there a way to stop Button click by returning false (like we do in normal javascript) to show a custom client side error message as an alert in Lightning Component? The usual way of using ...