Questions tagged [validation-rule]

Validation rules verify record data meets the standards you specify before the record can be saved.

179 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
2k views

Error: Request Entity Too Large: head - Any Suggestions?

I am creating my Data Model - Created one Custom Object with around 400 fields and 15-20 Validation Rules on it. Now, When I am trying to add more Validation Rules - It is giving me following error ...
3
votes
0answers
46 views

Custom Permission in Validation Rule evaluating as Null when assigned

We have a requirement to prevent changes to a contract record once active unless the you are a contract admin, which can span multiple profiles. I'm trying to accomplish this by using a custom ...
3
votes
0answers
434 views

Duplicate Management - Packaging Matching Rules

Matching Rules and Duplicate Rules are a new feature in Salesforce. I see that matching rules can be pulled as metadata xml, but I can't find any documentation about packaging them. Can matching ...
3
votes
1answer
324 views

Validation rule error messages not showing up on multiple entry Order Product page

I am working on Standard Order and Order Product objects. Here's the scenario: Restrict users from entering more than 100 Order Product items in Quantity on an Order. I've created a Rollup summary ...
3
votes
3answers
92 views

Valdiation Formula Broken

The scenario for the validation rule is: -if one lookup field is empty, then check that other n fields are not empty (if a lookup is empty, then make sure that the fields that will be used to create ...
2
votes
0answers
14 views

Email Message sent out even when Approval Request fails

We have an Approval Process (AP) and a Process Builder (PB) on Email Message object. We also have a PB on Case object. The logic is following: A user creates an Email Message on a Case record and ...
2
votes
1answer
554 views

Lead Conversion Validation rule error

I Created a validation rule on Lead to not select inactive Account while conversion, here is the validation rule that throws the error AND(IsConverted = True, ISPICKVAL(Account_Status__c,"Inactive"))...
2
votes
1answer
40 views

Why don´t these formulas work together?

The Expiry Date validation rule: OR( ISNEW()&& Expiry_Date__c >TODAY() + 182, ISCHANGED(Expiry_Date__c) && NOT(ISCHANGED( Partner__c)) || NOT(PRIORVALUE(...
2
votes
0answers
434 views

Web-to-Case creates record bypassing Validation Rule

Scenario : I am using Web-to-case to create case records. I have one Validation Rule which checks - AND((Account.RecordType.DeveloperName = 'XYZ'),(RecordType.DeveloperName = 'ABC')) But here is ...
2
votes
1answer
556 views

Validation Rule To Detect Translated Picklist Values?

I am trying to create a Validation rule which will stop closing the case when either the Case Type or Subtype is blank. The formula which I have written - AND( OR(ISBLANK(TEXT(Type__c)), ...
1
vote
0answers
184 views

Can we customize “We hit a snag.” error message title?

Can we customize "We hit a snag." error message title? If so how to do this? If not, is there any documentation confirming it is not possible? I couldn't find it... Here is the example error message ...
1
vote
0answers
59 views

Validation Rule on Lead Conversion - Best Practice

I have a Validation Rule on the Lead Object, to prevent the users from converting a Lead without filling in certain fields. The Validation works, but I want now to only requests those fields, if the ...
1
vote
0answers
33 views

Need help in creating validation rule

I need some help in creating validaton rule. the requirements are: If the value of a field on account is not equal to "Cleared", then the user should not be able to update the Service Appointment ...
1
vote
0answers
21 views

Validation rule error triggers page to switch from Lightning to Classic

I've created validation rules to dissallow users to change a 'status' field until certain fields are populated. This issue occurs when a user tries to change the 'status' without populating necessary ...
1
vote
0answers
79 views

Lightning modal - Scroll to top of page when there is a validation rule error

I am making a component that has a similar functionality like the standard lightning component. I am using modal mode and normal mode based on a value provider. I want when there is a validation error,...
1
vote
0answers
42 views

ISCHANGED always return TRUE on RichTextArea

I have a validation rule that should prevent changing of Rich Text Area field after creation. In order achieve this I created a validation rule that use ISCHANGED(RickTextArea__c) formula, but it ...
1
vote
2answers
504 views

Validation Rule on Conga Composer Button

I have a button as per below, that will generate a document for the client when clicked. However, I want to ensure this only fires when a field Job_Number__c has been filled out. And if the field is ...
1
vote
1answer
18 views

Assign leads per slot time

can validation do this ? Max 10 leads on Slot time per branch.. For example only 10 leads must be in 10:00am(Slot Time) per Iron Man(Machine).. Or apex/triggers will the job
1
vote
0answers
19 views

Can some explain below formula of excluding weekends counting

Can some explain below formula of excluding weekends counting, I want the explanation I'm not able to understand the below formula. The formula is : CASE(MOD( ActivityDate - DATE(1985,6,24),7), ...
1
vote
1answer
67 views

I want to create a validation rule which will throw an error if account created date is less than 6 months and type='Active'

i have used below validation rule ,but the issue is, it will check exact 180 days.there might be chances that there are 31 days in month and then days will be more than 180 days.Please suggest how can ...
1
vote
0answers
591 views

how to write validation rule for child object on basis of parent object by lookup relationship?

I have two objects, one is event and other is attendee. Attendee has to select event in the form of lookup relationship. Event has two types of ticket, general and vip. Attendee won't select vip ...
1
vote
1answer
50 views

Unexpected result in validation rule

I have a validation rules as follows: a <> related__r.b When a is null/or empty, the validation rule fails to trigger regardless of the value in b. I fixed the logic with the following: OR(a ...
1
vote
0answers
198 views

Insert operation triggering NOT(ISNEW())

I would like to ask for help regarding why an insert operation would trigger and fail this validation rule: AND(NOT(ISNEW()), ISPICKVAL(Pipeline_Type__c,'Licence'), ISBLANK(Related_Pipeline__c)) The ...
1
vote
0answers
217 views

Force “Stage” & “Probability” to Stay in Sync

I am fairly new to formulas and would like to write a validation rule that enforces the relationship between opportunity stage and probability (so that the two will always be in sync), but I only want ...
1
vote
0answers
27 views

Validation rule or Workflow process help on limiting users to 1 of each selection in a picklist

I have a plan picklist with 3 values (A, B, C) and a status with 3 values (Started, InProgress, Complete) all on the same custom Plan object. We want to prevent users to not be able to enter a new ...
1
vote
0answers
258 views

Reference a cross-object relationship or formula field using $ObjectType field set notation

Is there a way to harness cross-object notation in conjunction with $ObjectType field set notation? For example would it be possible to do the following: $ObjectType.ChildObject__c.Fields....
1
vote
1answer
370 views

Create Validation Rule Error Message

I'm trying to complete this trailhead challenge, but keep being notified that the rules don't check out. That doesn't seem to be the case when I attempt to change the Mailing Postal code on the ...
1
vote
0answers
529 views

How do I check if something is running as system in a formula?

Working with Process Builder, have a nice flow that checks the case for certain data elements, and then creates a new object if it couldn't find one automatically when the case was first created. (...
1
vote
0answers
2k views

System.DmlException: Update failed. First exception on row 0 with id xxx; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION

I have written a validation rule on quote which prevents users from changing the value of a checkbox "User_Flag__c" whenever the quote status is "Cancelled".We have a custom button on opportunity ...
1
vote
1answer
81 views

Certain profile user shouldn't be allowed to create record of custom object thru 'NEW' button on HOME page

I have a requirement for a custom Object, when user with certain profile (For example Sales) will click on "New" BUTTON (mentioned below is the screenshot of the same) then it should display error ...
1
vote
4answers
1k views

To display a prompt notification (Lightning design system)

The input field takes in a name and on the click of the 'submit' button, it saves this new account name. But if the input field is empty, then the program should display a prompt which says "error" ...
1
vote
1answer
82 views

How to hide Status(standard field) values when status has particular value

Can anyone suggest me to achieve below action. I am using Status Field, when ever the status value is Open then i should be allowed only to few status like "In Progress" and "Need Information". And ...
1
vote
0answers
564 views

FIELD_FILTER_VALIDATION_EXCEPTION, Competitor Required: Value does not exist or does not match filter criteria

we have lookup relationship called as 'Competitor' on opportunity object where it gives the account of record type competitor and in the filter criteria it gives only those competitor account whose ...
1
vote
0answers
310 views

How do you enforce a blank space in a validation rule?

I'm trying to enforce the blank space in the Canadian zip code validation but can't get it to work. Zip code needs to be A9A 9A9, it cannot be A9A9A9. Here's my syntax: and( (NOT(REGEX(...
1
vote
0answers
59 views

Client side confirmation message on Page layout

I am new to Salesforce and couldn't find any answer by direct search. So excuse me if this sounds very trivial. I'm building a functionality where on save (update) of an event page, some action will ...
1
vote
0answers
86 views

Opportunity Product Validation Rule Overinclusive

We use Relative Pricing code in our Org, which causes a recalculation of Opp. Prod Unit Sales Price if one of several fields are edited. For this example, let's say those fields are the Total Deal ...
1
vote
0answers
42 views

Bypass error rule in controller

I have a error manager rule in controller at quote line item level. Scenario is whenever a particular product 'X' is added by the sales manager ... dates field should be filled in. But if the same ...
1
vote
0answers
121 views

Cannot update Managed Package ValidationRule

I built a Validation Rule for a Managed Package object in my org (so this new rule is not part of the managed package). When I got to update that object's Metadata "Active" field, I get this error: '...
1
vote
1answer
49 views

Using a trigger to add data to a record

This sounds like an easy problem but I keep running in to problems. I am trying to populate a field from one object with data from another object. is this possible with a validation rule or would I ...
1
vote
2answers
613 views

Validation Rule between a Custom Object and Opportunity

I have a custom object called Projects with a lookup relationship to Opportunity. Each Project can have an Opportunity attached to it by selecting one using the lookup field. I am stuck trying to ...
1
vote
1answer
188 views

Field Dependencies & Formulas

I have got two picklists with Field Dependencies: "CODE" & "TEXT" e.g. (Code = A99) --> (Text = "Diodes") I like to have an automatism field filling, when a value in CODE is picked the field TEXT ...
1
vote
0answers
95 views

Fire Validation Rule before making SOAP callout

On our Account object, we have a set of validation rules to maintain data quality. We also have created a custom VF page to override New button and call a custom function when the user clicks Save. ...
1
vote
1answer
246 views

Salesforce Multi-Select field validation

I am trying to add a validation rule on a multi-select picklist field to avoid any invalid value to be updated on the record. You might be guessing how an invalid value can be selected for a picklist. ...
1
vote
1answer
44 views

Account/Client On-boarding process

Very basic question here: saw someone's SF the other day where, while using completely native SF functionality (no Apex/Visualforce) the user was able to create a client/account on-boarding process ...
1
vote
2answers
637 views

Validation Rule to restrict not to create any new user records with “Salesforce” Licence

For one requirement, I was trying to write a validation rule on USER object. Requirement: I need to restrict users not to create any new users with Salesforce licence. I have tried this ISPICKVAL(...
1
vote
1answer
217 views

Why is Apex Trigger being blocked by Validation Rule when Record Type ID has been specified

In each of my validation rules I have specified a list of Record Type IDs which the rule should apply to. AND( OR( RecordTypeId = '012700000005r08', RecordTypeId = '012700000005qzy', RecordTypeId ...
1
vote
0answers
28 views

Escalating custom pick list values…with several variables.

Our org has a custom pick-list field that shows which round of calling our small call team is currently on for a specific account and contact on a specific calling initiative. We also created a custom ...
1
vote
1answer
53 views

Use a document generation app to populate a template dependent on rule logic applied to input fields?

Just wondering if it was possible to tweak a document generation app to populate a template/document based on specific input fields whilst incorporating some rules? To be specific, I have created a ...
0
votes
0answers
28 views

Comparison between two fields in two different objects

I have two objects Opportunity and transaction. Where in i have master-detail relationship on transaction object with opportunity. I want to compare the field "location" which has three picklist ...
0
votes
0answers
18 views

Lead Validation Rule not showing up in Debug Log during Lead Conversion

This is a really strange behavior and I would like to know if you guys have faced this before. We have "Required Validation for Converted Leads" enabled (as below): The request was simple: Make sure ...