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

learn more… | top users | synonyms

0
votes
0answers
18 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
24 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
22 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
30 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
24 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
381 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
50 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
33 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
34 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
19 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
25 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
34 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
35 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
30 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
32 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
72 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
20 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
51 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 ...
1
vote
1answer
31 views

Get the row number where Exception occured

I got a VF page where a user can enter many contacts and save them all in one go. I got a validation on Email field to stop the user entering duplicate values when saving records. Therefore to catch ...
0
votes
1answer
27 views

Validation Rule on user when profile change

Requirement:When User Profile is getting changed to some other profiles then error needs to come. Suppose I am changing profile to (P1,P2,P3)then error needs to come.. If(Or(profile==p1,profile=p2)) ...
0
votes
0answers
24 views

Validation rules of Opportunity triggered while adding Opportunity Products

As per my understanding, field updates from workflow will NOT trigger any custom validation rules. In my case it triggers custom validation rules on opportunity when I try to insert a new ...
0
votes
1answer
86 views

Bootstrap Validator in Visualforce page

I am trying to use bootstrap validator inside my vf page but it is not validating. Got the refrence from Bootstrap Validator <apex:page sidebar="true" standardStylesheets="false" ...
0
votes
0answers
17 views

Syntax to show only few values form a field

There is a field called Job title on a custom object which while creating that custom object automatically fills the concatenation name of Account and Job field as a result I can see Account Name + ...
1
vote
1answer
37 views

Visual force page - SObject row was retrieved via SOQL without querying the requested field

I have a very basic question, regarding I believe addFields. Typically I would take the time to learn by reading around and testing how that works but I have just deployed my first page ever into my ...
2
votes
2answers
91 views

$profile.name in validation rule not working

Set up a validation rule like: AND( ISPICKVAL(PRIORVALUE(StageName), 'Closed Won'), ($Profile.Name <> 'System Administrator') ) After an opportunity is closed won, only system ...
2
votes
1answer
37 views

How can I display all the validation rule Error messages at once?

I have requirement where I need to show all error messages at one time from certain fields only. So when stageName changes to Ready there are certain fields lets say field 1 , field 2 , field 3 that ...
1
vote
3answers
33 views

Help Required with validation rule formula

I want to show validation error if the selected lookup record type is not special. Below is the formula I am using. ISPICKVAL(Type__c ,'In') && car__r.RecordType.Id <> '012q00000000V2R' ...
2
votes
3answers
115 views

Bypass validation rule on parent object while updating parent object from Child object trigger

I have an issue in bypassing the validation rules, looked into all possible solution provided in the stackExchange for last one week, nothing is working for me. Please help me here. Background: - ...
2
votes
1answer
66 views

Apex Class to Handle Flow/Process Errors from Validation Rules (Invocable Method/Variables)

I'm working on converting our workflow rules to Processes and Flows so that they can be better consolidated and followed by the business. I am running into the "Unhandled Error" message due to ...
0
votes
1answer
21 views

Help with Validation Rule

I am trying create a rule that will fire if the field is not blank and the length of the field is 7 or 10 or if the field does not start with 609. Here is what I have. The problem I had was the rule ...
1
vote
0answers
31 views

Stopping emails sent due to error/validation firing in Case trigger

Currently we have a validation rule on Case to stop spam emails from creating cases. When this validation fires, it stops the case from being created but an email notification is delivered to the ...
0
votes
1answer
40 views

Date.parse is not working as expected

I have a scenarios where Date.parse method is throwing an exception - "InValidDate". Scenario - A record with date value created in US (Locale US(English)) and when the it fetched in different locale ...
1
vote
1answer
38 views

Using external web services for validation

I need to be able to call an external web service to validate data being entered on a contact record before it is saved, and prevent the record being saved and display an error message to the user if ...
0
votes
1answer
22 views

System Error Created prevention in salesforce

I'm getting a custom validation system errors. How to prevent them: Error Email: Origin: LeadEmailHandler (this is an apex class) Error: Insert failed. First exception on row 0; first error: ...
0
votes
1answer
20 views

SFDC shall have a validation to not allow change of Customer Program's status if it is set to active once

I mean When record is created with status field=active,inactive,terminated.It should be saved,but when we do update status field 4m active to inactive/terminated,it should throw error. Means once ...
5
votes
1answer
46 views

Validation rule closed won

I am new tot validation rules. I am trying to allow three users and the system Administrator profile to update and an Opportunity set to ‘Closed Won.’ No other users should be allowed update. My ...
2
votes
1answer
37 views

How to prevent validation rules from firing when changing owner?

We have validation rules on lead object and there are few records that were created before the validation rule was defined. When somebody is trying to change the lead owner from UI, It is firing the ...
1
vote
1answer
35 views

salesforce Validation rule on Opportunity closed

I am trying to implement a validation rule where if an opportunity is closed then there are certain fields have to be edited by a public group users. consider public group as RTS Delivery. my ...
1
vote
1answer
21 views

How to properly apply data object field validation to a picklist

I'm on day 3 of my SalesForce development journey, what a cool platform, I'm having a blast. I hope I'm saying this correctly: we'd like to apply a data object validation rule on a picklist. Here's ...
1
vote
3answers
107 views

Validation Rule Limits For Standard Objects

I'm just starting out in SF development/Administration. We are trying to combine validation rules in order to preserve limits. I found in the documentation that custom objects are limited to 100 ...
0
votes
1answer
125 views

How can I use jquery validate plugin on vf page to validate only the fields that are rendered?

I'm using jquery validate plugin to validate a form on a visualforce page view the form is here . The first field renders either one set of fields or a completely different set of fields, so I think ...
2
votes
2answers
89 views

Field being used in two Validation Rule in Salesforce

Requirement is to use "Status" field in validation rule and "Status" is being used in two validation rule which is blocking each other when we activate both rules at a time. Requirement - 1 User ...
0
votes
0answers
63 views

Apex trigger with Field update not working for all users

I have a trigger that emails the Contacts Household Email whenever a new Absence object record is created for a Contact. Inside the Absence custom object, I have a field for email. I also have a field ...
0
votes
1answer
48 views

Validation rule checking for a combination of text and picklist fields

I have to write a validation on opp with the following criteria: When the combinations is as follows: Opp stage='Closed-Won' and (payment1__c!=Null && payment2!==null) Here the payment1__c ...
1
vote
1answer
80 views

Javascript Code is not working!

Whenever I am writing a javascript code to check if the input text is taking an empty value, it doesn't work. Please check what is the problem with my code? Page Code
0
votes
1answer
36 views

Validation on opportunity based on Opp Line Item fields

I need to have a validation on the Opportunity when it is set to closed won stage whether the 2 fields on opp line Item is Null or Not. If it is Null I need to throw an error message " Pls update the ...
0
votes
0answers
53 views

Validation Rule not shown on Standard Page Layout when Update from APEX

I am having issues showing a custom Validation Rule Exception on my Standard Case Page Layout. The scenario is that I have a custom button on the layout which calls a Webservice method in a custom ...
0
votes
0answers
58 views

Bypass Validation Rule because of After Insert Trigger

I have two objects A__C and B__c where B__C is the child of A__C. we have a before inert,before trigger on A__c and all after triggers on B__c. Basically the after trigger is used to calculate or roll ...