Questions tagged [validation-rule]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
19 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 ...
0
votes
1answer
32 views

Validation Rule not working :-

I have these stages in my Opportunity (0-Prospecting, 1-Presentation, 2 - Scoping, 3 - Prospecting, 4 - Closed). The below VR is such that only sys-admins can lower the stage from any stage. However, ...
0
votes
1answer
38 views

Exclude multiple users from Validation rule

I have lengthy validation rules for 6 fields, depending on Record type and subcategory. The rule is below. How do I exclude 4 users - so the rule does not apply to them? Thanks ( (RecordType....
0
votes
2answers
36 views

Trying to create a validation rule to stop the user (a mechanic) from updating or editing a repair record once the record has been marked completed

The Mechanic will fill out a repair record and can mark it as 'Not Started', 'In Progress, and 'Completed'. Once they mark the repair record as completed they should not be able to edit any of the ...
0
votes
1answer
29 views

“Protected” Records and profiles permissions

In our org, we have a custom object, which all records meeting specific criteria need to be protected (criteria is StartDate older than 3 months) By 'protected records' we mean: for some specific ...
0
votes
1answer
49 views

Lead Validation Rule

I have a Validation Rule for Leads and it's working perfectly fine, but I now want to make the State required, where applicable. I have created the below, but it doesn't execute, unfortunately. My ...
0
votes
0answers
22 views

Validation rule crashes when fields required are populated in form

I have a validation rule to require a Vacancy Announcement No to be filled in mandatory if a Date Vacancy Announcement Opened. I Cloned a ticket and it had the value beforehand in both places. Now I ...
0
votes
0answers
22 views

Validation Rule on Account and bypassing the Validation when converting a Lead

I have a validation rule on the Lead object to ensure certain fields are populated,before conversion. IsConverted = TRUE && OR( ISBLANK (field1), ISBLANK (field2), ISBLANK (TEXT(field3)), ...
0
votes
0answers
30 views

How to check Weekend days between two dates?

I have Three fields start date,End date and time off. If i give Time of(Number) is 4 and Start date Today, End date will update with Today+4. If i give Start date Friday and time off 3 as per the ...
0
votes
1answer
33 views

Rich text field in Salesforce doesnt works with ISBLANK and works with =''

I have a rich text field on my object and have validation to check if it is blank I want to throw an error message. ISNULL(richText__c) in validation returns FALSE - I'm okay with this. ...
0
votes
0answers
34 views

Complex criteria Opportunity Validation Rule

I have a requirement of restricting the opportunity ownership change these are my conditions Opportunity stage =closed won ,Closed lost (we have a Formula Field called 'Team' which is based on ...
0
votes
1answer
78 views

Get all validation names to include in xml package

I'm trying to search and replace all validation rules in vs code. I ONLY want to retrieve validation rules, and not the entire object. I know this is possible using the xml package, however I'm ...
1
vote
0answers
29 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 ...
0
votes
1answer
44 views

Validation rule on null picklist case object not firing

I am trying to create validation rule, when closing the case if product type and component and subcomponent is empty to fill the values. AND( OR( ISBLANK(TEXT(Product_Type__c)), ISBLANK(TEXT(...
1
vote
2answers
75 views

Download all objects and search validation rules only

I've recently setup vs code in hopes that I could easily download all validation rules and search across them for a string. We're updating our roles and role names are used in a lot of validation ...
0
votes
1answer
30 views

Required fields under Record Types and Subcategory type [duplicate]

I need to make those fields required under 2 conditions. Record type and Subcategory (picklist). I stated doing Validation rules, for the first one: Record type: Passport Subcategory: Renewal and ...
5
votes
1answer
542 views

Spring 20 - Validation rules that use “$UserRole.DeveloperName” are triggering when they should not

After the Spring 20 release my validation rules that make use of the field "$UserRole.DeveloperName" are triggering when they should not. I'm currently trying to create a case from a community (with ...
0
votes
0answers
26 views

Auto Generation of Work Orders from Maintenance Plans Failing

We are trying to get auto generation of Work Orders and Service Appointments working, however when we try to generate Work Orders with the following generation types it always fails: Work Order ...
0
votes
2answers
23 views

Fetching standard object through ANT

I am facing a validation rule related issue on a field in Case object. To find the exact problem, I need to search every validation rule for each field. To do that I am trying to fetch the Case ...
-1
votes
1answer
33 views

How do I prevent opportunity stages going backwards direction ? salesforce [closed]

How do I prevent opportunity stages going backwards direction ? using validation rule salesforce
0
votes
1answer
42 views

Do extra brackets matter in formulas?

I am creating a Validation rule. Trailhead states that I should use following formula: ISPICKVAL( StageName , "Closed Won") && ( Delivery_Schedule_Date__c - CloseDate ) > 14 I have the ...
0
votes
2answers
75 views

Validation Rule stops Process Builder to fire

I have a Process Builder and a Validation Rule on the Opportunity Object. The Validation Rule is meant to stop the users from modifying an Opportunity once Closed Won, apart from Admins. AND( ...
0
votes
1answer
44 views

Prevent Close Date Change Except Current Quarter?

I need validation rule to stop users from editing Close Date if Opportunity is in "Commit" category, except Admin. But if the date changes in a range of current Quarter then it is okay to make change. ...
0
votes
0answers
37 views

prevent malformed id or invalid Id saved for lookup fields

When creating a new record of custom objectA, there's a lookup field orgAccountId binding to account. Regular way is: enter orgAccountId such as 0000001 in the field, press enter, and it will search ...
0
votes
1answer
31 views

please help with approval process!

Need help! I am trying to do an approval process, that will be triggered automatically from process builder. The problem I have, is picklists. I want the approval to go out automatically on the ...
0
votes
1answer
14 views

Does execution log show all validation rules occur in each iteration or not?

In the image above every iteration has its validation rule occurred, I wonder if there were more validation rules, does the execution log show all of them in every iteration or show only one ...
0
votes
1answer
29 views

Validation Rule trigger

Hi i am trying to restrict the user to change the Acc_Id on the basis of certain field. Below is the code : not working. If yyyyyyyy__c = true Suuuuuu__C = "Complete resolve No one should be ...
-2
votes
1answer
30 views

How do I prevent user saving a lead record if lead status is open? [closed]

New to Salesforce, trying to build my experience and knowledge with some basic freelance work, any help is appreciated!
0
votes
2answers
52 views

One or Nothing Validation Rule

Need to create a validation rule that will evaluate 5 picklist fields and this are the requirements: Only one field can have a value regardless which one of the 5 fields all fields can be blank This ...
0
votes
1answer
35 views

Validation Rule with $Profile

I want to create a Validation Rule that must fire when Account Name is changed and profile is different from ProfileId_1 and ProfileId_2. I tried with different validation rules, but none works: ...
-1
votes
1answer
15 views

Multiple Validation Rules Not Working

I am trying to require certain fields when a checkbox is selected but whether the conditions are met are not, I am getting an error. I am no SF admin and am trying to figure this out on my own. Please ...
0
votes
2answers
36 views

Validate Lead RecordType matches Target Opportunity Record Type before Converting

Scenario We have two types of opportunities and two types of leads. The two opps are for different business processes related to the customers specific needs. We currently have sales agents able to ...
0
votes
1answer
14 views

Avoid or prevent Lead edition when status is “Qualified”

I have the next requirement: When users set lead to 'Qualified', I want a way to prevent them to editing any field. I've tried some things like validation rules like this: ISPICKVAL(PRIORVALUE(...
0
votes
1answer
34 views

Checking for multiple values with CONTAINS

I'm trying to condense this validation rule formula: OR( CONTAINS( Email , "example@gmail.com"),CONTAINS( Email , "example2@gmail.com") I want to use || logic but I'm receiving this error: Do I ...
0
votes
1answer
21 views

Scoring fields - No partial scoring can be entered in the section of fields

I have a section of scoring fields to enter score. Once a score is entered, it cant be editable by anyone else except Administrator. No Partial Scoring can be done on the fields. Once they edit one ...
0
votes
0answers
19 views

Validation to require Product B to have 2 times the quantity of Product A, and not allow adding Product A without Product b?

Trying to come up with a validation rule to only allow product A to be added if Product B is also added to the opportunity, AND then ensure Product B's qty is 2* product A's qty?
0
votes
2answers
37 views

Validation Rule with multiple picklist fields

I need to create a validation rule that fires where when either "Complete" or "Closed" is chosen from a picklist, another picklist becomes a required field. I have tried multiple options, but have not ...
0
votes
1answer
13 views

Make picklist value setable on creation or by admin only

I have a picklist of stages - let's use the example stages below: Unqualified <- Default / Record creation state Qualified Enrolled Under Review Active Where as this record progresses through the ...
0
votes
2answers
43 views

REGEX Validation rule for multiple lines of dates

I'm trying to find a regex pattern for a validation rule on an opportunity that will allow dd/mm/yyyy one or more lines in a long text field named Dates_offered__c. For example, I want to allow: dd/...
0
votes
1answer
25 views

Setting Contact mandatory in Cases

Our org Cases in SF, contacts are not set as mandatory. I want to set it to mandatory by using a validation rule to associate with Contacts. But the validation rule will not work, as we have designed ...
0
votes
0answers
22 views

Can I add custom error message on visualforce page instead of standard error message thrown by validation rule at the top of visualforce page?

Controller: Database.SaveResult[] sr = opportunityhandler.createOpportunity(oppObj); isErrorOcurred = checkErrorsInResult(sr); System.debug('isErrorOcurred>>>'+...
0
votes
1answer
162 views

validation rule on when case status is closed then not possible to re-open

my requirement is : When case status is Approved or Rejected , then not possible to re-open the case and show alert like "Approved / Rejected cases not possible to open...." How can we acheive through ...
0
votes
0answers
17 views

error with validation rule when making list of past roles

i'm working on making a list of past roles which include a start and end date from when the role was held. however i'm having trouble making it so before adding a new role, the previous role must be ...
3
votes
0answers
34 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 ...
0
votes
1answer
133 views

can too many validation rules cause a performance issue with large data - Apex CPU Time?

I have a bulk update process which effects updates records in more than one salesforce objects like - Account, Contact, Contract , Opportunity and Oppt Line Item. This bulk process does not update ...
0
votes
1answer
68 views

How to display validation rule error message for opportunity multi line layout?

I am have requirement to display error message while adding opportunity products in multi line layout. i have created validation rule with respect to condition on custom fields which are added to ...
1
vote
1answer
45 views

My Validation Rule isn't working properly

I have a custom object that track several products, but none are required to be filled out. However, if there is a product, I want to make sure my users are inputting all the necessary information. So ...
0
votes
2answers
78 views

Validation Rule on Lead Conversion

I have a validation rule on Opportunity that I want to fire only when a new opportunity is created without Lead Convert process. It should not fire when an opportunity is created using Lead conversion....
0
votes
1answer
33 views

Validation Rule - Picklist being ignored

I am trying to create a validation rule that has multiple sets of criteria, one of them being preventing the LeadSource picklist field from being blank. Below is my formula which for some reason ...
0
votes
2answers
32 views

Validation Rule-If Active checkbox in unchecked, then Reason for cancellation is mandatory Applicable only to record type End Client

This is the Validation for Account Object -Person Account If Active checkbox in unchecked, then Reason for cancellation is mandatory Applicable only to record type End Client And I have written the ...

1 2 3 4 5 15