Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [validation]

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

0
votes
0answers
13 views

Dynamically set apex:inputField required attribute while using CSS to hide/show field

How do I dynamically set the required property on apex:inputField while using CSS to show/hide said field in order to avoid the validation error upon saving a form that has said field as hidden AND ...
0
votes
0answers
20 views

Related Lookup Filter Deployment Issue

I am trying to validate Knowledge__kav object and it has related lookup filter to some other custom object. This validation is done through ant. The issue occurs when i try to deploy this related ...
0
votes
0answers
23 views

Project manager cannot update Project Stage to completed till all tasks under the project are completed [on hold]

AND(project_update__c <> total_task__c , ISPICKVAL( project_Stage__c , "completed") ) any help?
0
votes
1answer
17 views

Validation Rule to make picklist field mandatory based on picklist value selected?

I have a Primary Department picklist that controls a Division picklist. I need the Division field to become mandatory if the Primary department picklist equals "Medicine", "Surgery", or "Pediatrics". ...
1
vote
1answer
33 views

Issue - Picklist fields are only supported in certain functions

I am working around salesforce's formula field in Process Builder, to compare two fields values. For instance, the field Contact_A__c and Contact_B__c are picklist field types. I am attempting to ...
0
votes
1answer
30 views

Ignore validation on before update/insert trigger?

I have a before insert/update validation trigger which I would like to be able to ignore when doing mass updates via data loader. Figured if I just add criteria of "checkbox field = true, ignore ...
1
vote
1answer
32 views

Lightning component flow custom validation error message

I'm following the instructions here to create custom validation for a Lightning Component in my Flow: Available For Flow Screens Custom Validation Salesforce validates each flow screen when ...
0
votes
1answer
19 views

Login Page Validation - AMP Script

I have a requirement to validate the credentials in the login page for the data in one the DE that I have for the client. I have created a login page in cloud pages/ landing pages ( salesforce ...
0
votes
1answer
21 views

Forcing validation rules to work a lead is converted

I have four custom fields in a lead that are mandatory when creating an opportunity. I have validation set up that if you try to create an opportunity it blocks you from saving if you have not filled ...
-1
votes
1answer
34 views

approve article before publish

I am going through an strange issue while implementing a validation rule/trigger. i want to check if article are in approved status (custom field) before it can be publish. i don't want to allow a ...
2
votes
1answer
71 views

Validation rule - created date < FIXED DATE

I'm trying to add a line to a set of existing validation rules so they only apply to opportunities created prior to a fixed date. Let's say 10/31/2018. I thought it would be pretty straightforward as ...
0
votes
0answers
25 views

Validation Trigger Issue [duplicate]

I have a previous validation rule that I made into a trigger that isn't working. The validation rule formula is: AND(ispickval( Status, "Trades Needed*"), ISBLANK( Financial_Account__r....
0
votes
1answer
8 views

Can I Create an Order Product which ends after its parent Order?

I have a case where I would like to be able to be able to create an Order Product record with an end date that is after the end date on the parent order. When I try to save the order product record I ...
0
votes
1answer
15 views

validations are running while running test classes

validations are running while running test classes .How to fix that. While deployment validation are running and failing deployment due to same. Please suggest how to fix as test classes are many and ...
0
votes
2answers
22 views

I have requirement where i need to disable validation rule to avoid deployment errors

I have requirement where i need to disable validation rule to avoid deployment errors. I have added a custom setting and my rule is below AND($Setup.cust_setting__c.ValidationsOff__c=FALSE, (ISBLANK(...
0
votes
1answer
34 views

Attempt to de-reference a null object validation

I'm converting all our validation rules to a trigger to free up a couple object references since we've reached the max. I seemed to have created the trigger okay, but now I'm having an issue of ...
3
votes
0answers
67 views

Salesforce Bulk API v2.0 INVALID_SESSION_ID

Following the Salesforce Bulk API v2.0 documentation at: https://developer.salesforce.com/docs/atlas.en-us.api_bulk_v2.meta/api_bulk_v2/walkthrough_upload_data.htm https://developer.salesforce.com/...
1
vote
2answers
54 views

Implement Salesforce filter Criteria Logic

i Designed my own Salesforce Advanced Search with filter criteria but i'm unable to Validate filter Criteria of "(1 AND 2) OR 3", if it is validated then my advanced search work perfectly, how can i ...
1
vote
1answer
26 views

Date Validation in Apex

I have a problem with validation date input on backend. I have a date input on frontend and when i fill it with invalid data and try to upload record, it will proceed but date will be empty. What i ...
0
votes
2answers
47 views

Apex trigger to work as a validation Rule

on the Account Object i need a validation rule which need to prevent Accounts from being set to 'Dead' if there are Orders associated which have a Status <> Invoiced. Account field to be checked = ...
1
vote
1answer
51 views

Unable to detect the System Admin in a validation rule error condition formula

I have a business scenario where I would like to restrict the transition to the Accepted status of the Quote object, only to the admin. For this I configured a validation rule with the following ...
0
votes
3answers
33 views

Validation is not working on multiple conditions

I have a requirement to give access to few users changes leads ownership to there names. So, I need a validation rule if they try to change ownership from other users. But it's not giving any error ...
1
vote
2answers
72 views

Validation rule to check consecutive characters in field

I need to throw an error if there are three consecutive characters in field value. like aaa,bbb,ccc,eee,AAA,BBB etc. I am using below condition to check but dont think this is good solution. OR(...
0
votes
1answer
18 views

need to check birthdate in Validation rule

I need to check birthdate in validation rule .If birthdate==01/01/2000 then i need to throw an validation error. I used below condition but I am getting different error Birthdate=DATE(01,01,2000) ...
0
votes
2answers
161 views

Lightning Input Field Date validation

I have a <lightning:inputField aura:id="table-cell" fieldName="Date_of_trx__c" variant="label-hidden" id="{!indx}"/> And i need to make validation on it, to accept maximum date of "...
1
vote
2answers
456 views

How to do field validation on lightning:recordEditForm with lightning:inputField

Background I have a lightning component with a lightning:recordEditForm for creating new Opportunity records. The lightning:recordEditForm contains many lightning:inputField 's I would like to ...
1
vote
1answer
35 views

Validation rule to fill in fields if multiselect field is selected

I am trying to create a validation rule, which says the following: If any value is selected in the multiselect picklist, then at least two of the following 4 fields must be filled in. Multiselect ...
0
votes
2answers
83 views

How to validate two dates are in range of 10 years in Lightning Component

I want to validate that when user enter Start date, then end Date should be in range of 10years. <ui:inputDate aura:id="startDates" label="Start Date: " displayDatePicker="true" value="{!v....
0
votes
1answer
32 views

What async notification options are available in OOB LEX UI?

I have created a trigger that validates user input against a web service after insert/update. Originally, I wanted to show a validation error on the data entry screen, but this is not possible due to @...
2
votes
1answer
23 views

Validate Rule Doesn't Throw Syntax Error But Doesn't Throw Errors Either

I'm trying to run an Account Validation Rule where if the Account Status Equals Closed, Users cannot update the Account. System Admin Profile is allowed to edit. There aren't any syntax errors on ...
0
votes
1answer
90 views

Can we perform frontend validation with lightning:inputField? [duplicate]

I'm creating some small lighting components for use with Quick Actions. While "Never trust the client" means I will have backend validation, for a good user experience, I'd prefer to prevent bad data ...
0
votes
2answers
25 views

Creating a trigger, that loops through auto number field, checks date and updates specific field to expired

I have an object named EXAM, exams have a unique Autonumber ID that starts from 0 and goes up to 10000. But this auto number is recorded as a TEXT by default. I want to create a loop, that goes in to ...
0
votes
1answer
115 views

Regex validation for Phone Number

I am trying to create a validation rule for US format number and using the following regex Validation NOT(REGEX(Phone, "\\D*?(\\d\\D*?){10}")) The above seems like a standard regex which will only ...
0
votes
1answer
283 views

Custom validate lightning input [duplicate]

I'm working with a lightning:input for an email address and I'd like to be able to validate the input with a button click, separately from the out-of-the-box functionality that checks if the field has ...
0
votes
1answer
176 views

FIELD_CUSTOM_VALIDATION_EXCEPTION: Attempt to de-reference a null object

I'm facing a weird issue in our customer org. We try to update some lead objects in our managed package after some processing. We are seeing that sometimes the objects are updated successfully whereas ...
0
votes
2answers
79 views

Method to limit total number of child + grandchild records

I have a Master object object called Application__c and the child object is Credit__c . I have another object called Credit_Plan__c ,which is the child object of Credit__c. (Application__c <=== ...
0
votes
1answer
69 views

Validation Rule: Picklist Field Required - Based on Lookup Field Values Selected First

I have users searching for values in a Lookup field in Salesforce on a Custom Object. When these users select 8 specific values (out of the long list) I want to have a subsequent picklist (...
2
votes
3answers
122 views

Is that possible to write a validation rule that would allow to update only two fields of 800 on a custom object record?

My colleague asked me today an interesting question I never thought of before. Is that possible to write a validation rule that would allow to update only two fields of 800 on a custom object? I know ...
1
vote
1answer
66 views

Validation rule to allow modification of limited fields only

I have a object that has more than 40 fields. There are 3 record types and each layout shows different fields. Now, I want to write a validation rule which allows editing of limited fields only when ...
1
vote
1answer
43 views

Validation rule not firing if there are empty spaces in Long text area field

I have a validation rule that should fire whenever there is a value on field 'A' and the 'description' field Long Text Area(32000)) of case object is left blank. This rule fires for manual cases but ...
1
vote
0answers
24 views

Using addError on object in trigger for custom validation messages is taking users to random Picklist Value Sets page in Lightning?

I have a page for a custom object that contains a link: <apex:commandLink styleClass="actionLink" onclick="return confirm('{!$Label.PCE_Are_You_Sure}');" action="{!URLFOR($Action.PCE_Step__c....
0
votes
0answers
41 views

Multiple Validation Rules on a single field to be merged as one

Unknowingly there are 2 validation rules created for a single field and here are the rules. Rule1 : AND( ISPICKVAL(tesname__PotentialLiability__c, "Yes") , NOT(ISBLANK(tesname__Due_Date__c)), ...
0
votes
3answers
90 views

How to restrict Number fields in Validation rule

I have Custom Object called "Review", with the formula field as (Culture_fit__c + Experience__c + Leadership_Skills__c + IF( Recommend_For_hire__c, 5, 1 ) ) /4. with Number ...
1
vote
1answer
13 views

Lock Opportunity Products after closing Opportunity

After we close an opportunity we start charging the customer every month. We do not want anyone after the closure of an opportunity to be able to add more Opportunity products. I set a new field ...
0
votes
2answers
51 views

How to maintain the consecutive order in validation rule

I have 3 lookup fields (Approver1,Approver2,Approver3). I need to write validation rule to maintain the Approvers in consecutive order. Please check these Scenarios: "Its Like previous value should ...
0
votes
0answers
32 views

Validation rule not thowing an error in sf1 app

I am having a strange issue. I have created a validation rule on Contact object. The rule shows an error message when someone tries to update a closed contact. Closed value is contained within a ...
0
votes
1answer
31 views

Apex Trigger Validate Case and Task Record Types

I am trying to create an Apex Class that runs on a BeforeInsert trigger and checks to see that the Task Record Type and Case Record Type are of a certain value each and if not throws an error. For ...
0
votes
1answer
53 views

Lead Status Validation Rule

I need to write 3 rules on the Lead object to ensure that Executives are approving leads before the sales team spends time on them. Rule 1: When a Sales Person puts the Lead into 'Research Qualified'...
0
votes
1answer
70 views

Validation rule on a custom button to fire if not all fields are filled by the user and not allow user to move on

I have a custom conga sign button that sends out the contract, but we want a validation rule on the button so that the user cannot send the contract until all of the fields have been populated. ...
0
votes
1answer
39 views

Find Missing Date Ranges in SQL

Is there any way to Find Missing Date Ranges in SQL? Basically, I'm trying to find out how I can identify any missing days the last 3 months. I've already got a list of dates and volumes but unable ...