Stack Exchange Network

Stack Exchange network consists of 175 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
12 views

Created Validation rule to ensure product has been added before a certain stage, but can't add products

Created Validation rule (below) to ensure product(s) has been added before a certain stage, but can't add products to an already created opportunity that is beyond that stage. When I go to add a ...
-2
votes
1answer
21 views

Validation Rule not working properly as per the Requirement

Need a small help, i am trying to create a validation rule on a lead object - the requirement is whenever the lead status is converted to "Closed - Not Converted" it should throw an error on ...
2
votes
2answers
40 views

Lightning Web Component Custom Errors

I'm trying to do some custom validation on submit for a Lightning Web Component. I'm trying to use the setErrors method for a lightning-input-field (https://developer.salesforce.com/docs/component-...
1
vote
0answers
26 views

Validate inputs on server side

BACKGROUND I am working on a lightning component which is a simple form that takes from, to emails and a message body as user input and passes this data to an apex controller. Apex Controller ...
0
votes
0answers
17 views

Not able to show error message below the dependent fields in lightning only & it is getting in classic

In classic for the dependent fields, the validation is firing good & in lightning also it is firing well. But, in lightning when the first field has value, then the second field which is dependent ...
0
votes
0answers
11 views

Standard text field throw error on inputting and not after save button is clicked

Billing Country is a standard compound field where on typing value , is there a possibility to throw an message rather than on save throws like validation rules.
1
vote
0answers
26 views

is element validity object is extendable?

I want to extend element.validity, so that can add more custom error type in that. Tried many ways to copy or deep copy and Object.create element.validity but seems like its not possible ... @api ...
0
votes
1answer
28 views

How to compare two IDs of different objects in testing? [closed]

Getting a failure error after running the test class... System.DmlException: Insert failed. First exception on row 0; first error: FIELD_FILTER_VALIDATION_EXCEPTION, Value does not exist or does not ...
0
votes
0answers
19 views

Prevent records from getting updated if there is related case with a record type Complaint

I have a an object . I have created a look up on Case for that object so that it shows the related case with a complaint record type case . Now I want users to close the case before proceeding to ...
0
votes
0answers
17 views

Cannot set <force:inputField> validation error on field in custom quick action lightning component

I have designed a quick action lightning component to clone one of our [complex] custom objects. The requirements are: Add a lookup field where the user would be able to choose another parent ...
2
votes
0answers
65 views

HTML <select> required Attribute not working in Visualforce?

I'm trying to implement a form with a required drop-down list on a VF page, as described in this example. If you click on the link above and run the sample, it works fine but when I try to implement ...
0
votes
0answers
22 views

How to validate lookup lightning input field in record Edit form

I have a record edit form with multiple custom lookup fields. Standard validation rules on lookup fields with an invalid input would give an error message "An invalid option has been choosen". Looks ...
0
votes
0answers
22 views

Need a small regex help

Needed some help while constructing the below pattern for salesforce contact Phone Field Condition1: must start with ‘0’ Condition2: can only be followed by digits and spaces. Condition3: minimum ...
0
votes
1answer
34 views

<lightning:input type=“date” validation

I need to put a validation on lightning input field date. It is a date of birth field and it should not accept date beyond system.today(). Basically the validation will be date_Of_birth > Today() , ...
2
votes
1answer
36 views

Validating Apex method parameters

Is it a good practice to validate method parameters in Apex methods? In C# and Java you generally validate against nulls and throw argument exceptions to prevent usage errors. I don't seem to see that ...
0
votes
2answers
64 views

How to limit picklist values based on Role?

I have added a value to a picklist that is dependent on the value of another picklist. I have added the same value to a different picklist. It is added for particular record types. When the user of a ...
0
votes
1answer
25 views

how to create validation to restrict the owner based on Role

I have validation rule on Account, there is a picklist channel.If the the picklist channel equals to Direct then no role can edit or create the Account record except the owner 'sales executive' role.i ...
-3
votes
1answer
31 views

Validation Rule for Picklist

Hi Req as follow : There is two Picklist Values Filed safety Check and Unit Safety Check and another picklist value as Status : Hence Status must be in the "In Progress" state when there must be some ...
0
votes
1answer
19 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
51 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
58 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
33 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
65 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
39 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
23 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
52 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
90 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
78 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
139 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 ...
0
votes
1answer
98 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
127 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
28 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
11 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
21 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
67 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
360 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
227 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
49 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
398 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
47 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
85 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 ...
0
votes
1answer
167 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
423 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
26 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
26 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
42 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
120 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
173 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
98 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 ...