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
1answer
14 views

Validation rule for non testing context

In Apex to separate code execution for test and non-test context we use the following method Test.isRunningTest() Do we have any such thing for validation rules i.e the validation rule should be ...
0
votes
2answers
40 views

Validation Rule to check PRIORVALUE

I am writing one validation rule where status is Pending/In Progress and I am changing any value from record then I need to throw an error 'you cannot edit the record'. AND(OR( ISPICKVAL( Status , '...
1
vote
2answers
26 views

how to make phone field unique

i want to make phone field unique for this i have tried triggers but i want to write validation rule for this i have written something like AND( CONTAINS( VLOOKUP( $ObjectType....
0
votes
2answers
27 views

Identify existing records which fail a new validation rule

After adding a new validation rule, existing records may be 'invalid'. This causes issues for me because processes and batches will fail to update those records. How can I identify which records are ...
0
votes
2answers
17 views

Validation Rule text field required when multi-picklist value is selected

I'm trying to have a text field required when a value is selected in Multi-picklist field IF( AND(TEXT(Environment_Access__c ) = "DevQA", ISBLANK( Business_Justification__c )), True,...
-6
votes
1answer
34 views

Salesforce Validation Rule [closed]

I have a requirement that in Filed client_Logo__c(URL) whenever user enters any URL : IF it dosen't begin with http or https then it must throw a validation error.
0
votes
1answer
20 views

Validation rule that flags if File is not present on custom object?

Requirement is to prevent saving of a record if a File (in this case, a quote) is not attached. Is this accomplishable declaratively?
0
votes
2answers
51 views

Eliminate consecutive two dots

How to eliminate consecutive two dots in validation rule and 1st char should not be . [dot] example: sal..esforce - invalid sal.esforce - valid .salesforce - invalid salesforce. - valid ...
0
votes
1answer
33 views

Add validation to managed lightning button

I have a managed (detail page button, content source: visualforce page) button which when clicked opens a visualforce page, I want to make this button shows a message if a field on the object is ...
2
votes
1answer
75 views

Validation Rule with both AND/OR logic

I need to require the Length of SOW field to be entered if the opp is not in Long Range Forecast or Discovery stage. If I just have one of the stages in the formula, it fires just as expected. Once I ...
1
vote
2answers
43 views

Required field validation error message in VF Page using Javascript? (No Alert box or Popup's)

I want simple message 'Complete this field' (as shown in image below) to displayed under input boxes which are empty while submitting the form in VisualForce page. Can someone tell me how to ...
-1
votes
1answer
41 views

Validate a form with Apex and server side controller

what function can I use when I need to validate a form with Apex on the server side controller? I can't find functions on the internet. This is my code: View: <form class="slds-form--stacked"&...
2
votes
3answers
98 views

Validation Rule Assist: Lock down multiple lead fields after they are first populated

I am trying to create a validation rule to lock down our original utm fields on leads after they are first populated. Essentially I would like to prevent everyone (including our marketo sync user) ...
0
votes
1answer
23 views

Validation rule to prevent all other users from changing lead status when lead is “New”

I am trying to create a validation rule to prevent users that aren't associated with the user Id profiles from changing a "New" Lead Status to any other status When I check the syntax for the below, ...
0
votes
0answers
10 views

Null result on parent Account field [duplicate]

I would like to compare a field on the Opportunity to one on the Account to validate them. My string AccountClassif = o.Account.Account_Classification__c; is debugging as NULL when it has a value. ...
0
votes
1answer
17 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
38 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
1answer
94 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
98 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
35 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
164 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
29 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
44 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
84 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
199 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
1answer
10 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
20 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
23 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
37 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
90 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
92 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
41 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
49 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
57 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
38 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
103 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
19 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
320 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 "...
2
votes
2answers
1k 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
50 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
133 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
38 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
108 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
26 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
291 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
394 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
265 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
92 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
148 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 (...