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
0
votes
0answers
15 views

Validation rule with date and time controls

I must propose a solution for the following validation rule : I must check that the delivery date entered by the user is D+4 strictly compared to the date of the day(Are excluded on Saturday and ...
0
votes
1answer
23 views

Which validation rule do I use to exclude numbers in a text field?

I have a field where i don't want any numbers in it. How do i set up the validation rule? I tried playing around with ISNUMBER. NOT ISNUMBER(ShippingCity) Can someone help me?
0
votes
1answer
21 views

How can I put another Object in the Opportunity validation rule?

I'm trying to allow only the Account's Owner and Account Team Members "001" to create opportunities. But I'm getting "The AccountTeamMember field does not exist". How can I solve ...
0
votes
1answer
41 views

Database.convertLead - FIELD_CUSTOM_VALIDATION_EXCEPTION, Validation error on Lead: Select an Individual record type.: []

I am trying to deploy a class with a test that automatically converts leads. This Apex method will be invoked via Process Builder. It works fine in the Sandbox environment, and the test worked fine ...
0
votes
0answers
15 views

Help! Why REGEX rule is not working when excluding constant strings?

the following rule is working however I want to stop my user to add some fake website in my org. AND( NOT(ISBLANK(Website)), NOT( REGEX( Website, '^(https://)?([A-Za-z0-9]\\.|[A-...
0
votes
2answers
20 views

Validation rule, based on Picklist value 3 other fields to be populated

I need to make a validation rule with picklist. If Picklist value is "Yes" all 3 other custom fields to be populated (cannot be empty). The formula below works only with one of them, does ...
1
vote
1answer
33 views

help with logic for validation rule

Ran into a quick logic issue for this validation rule I'm writing. Basically, I only want to be able to save a record if there's no other Active record of the same Level. For example- if an Active ...
0
votes
1answer
16 views

Date field shall be edited only within certian date

I have a Date field where date field can be only edited within 7 days of the date entered. For example: if new value of start date is within the 7 days then and then record can be save. If certain ...
0
votes
1answer
32 views

REGEX Validation Rule to prevent duplicate in set of numbers

I'm working on a validation that would require a user to enter only numbers that have to be exactly 9 numbers and be separated by lines. The below is working for that, but is it possible with straight ...
0
votes
2answers
19 views

Validation Rule Opty Stage

Validation rule need to be triggered when Opty Stage is 'Closed Won', but the below rule is triggered when stage is new AND( OR( ISPICKVAL( StageName, "Closed Won")), ISBLANK( ...
0
votes
0answers
9 views

Make Opportunity field not required during lead conversion but required when field is blank on record update

Please help me on this urgently I have a field say "X__c" which is required on Opportunity Object only But during lead conversion since this field is not present in leads, it is preventing ...
0
votes
1answer
22 views

Bypassing Validation rule by fields?

I Have a scenario we have one field "start date". Whenever the start date has passed the seven days we cannot edit this field. But we can edit other fields in the record if we even pass the ...
0
votes
1answer
22 views

Validation rule, not correct AND statement

I have two validation rules, that are on the one object, but with similar logic. The first rule: AND( ISPICKVAL(Status, "Completed"), OR( ISPICKVAL(WorkOrderCategory__c ,"Softener ...
0
votes
0answers
34 views

Validation Rule for Account to request fields not to be blank to change Stage isnt working

This is my Validation Rule I do not understand where is the issue If you are no admin, and CEO hasnt approoved it you shouldnt be able to change Account Stage without filling out infor for company ...
0
votes
1answer
34 views

Validation rule if Opportunity is closed won

I want to make some fields required, if the Opportunity is closed won. So I tried the following code, but it does not trigger, so the AND seems to be always false, but I do not know why. AND( ...
1
vote
1answer
25 views

Validation Rule not working (Something wrong with picklist values in validation)

Validation rule is not working properly. It doesn't let me to save the record with status completed, if I didn't select the two fields. When I select one, it should show the error, that I need to ...
0
votes
1answer
20 views

Validation rule to prevent change if field has specific value

I have a situation where I want to prevent (some) users from changing a picklist field once it has been set to a specific value. I'm trying to create a validation rule that fires if the field is ...
0
votes
2answers
22 views

Can't create new Task

I'm running into the error "Required fields are missing: [Status]" when trying to create a new Task, but Status is a PickList with a default value, so I don't why it won't use the default. ...
0
votes
1answer
23 views

How to Add validation rule at the time of insertion but not during Updating field value? [closed]

I want to Add validation rule at the time of insertion but not during Updating field value
0
votes
1answer
32 views

Validation Rule Help - close to answer

I'm working on a validation rule where I only want the profiles of the system admin and finance to be able to edit certain fields if the type=customer. The following formula works for only letting the ...
1
vote
1answer
40 views

New to Salesforce and still training, but need help with Validation Rule

Course name, Duration, Course Fee and category fields are all mandatory, but duration for (Java) picklist value under course name field should not be mandatory. The validation rule I currently have is ...
0
votes
1answer
26 views

Strange behaviour of ISNEW in Validation rule

On the Opportunity object i have a validation rule as follows AND ( NOT(ISNEW()), RecordType.DeveloperName = "My_Opportunity", ISNULL(CustomTextField__c) ) The goal is to ...
0
votes
1answer
58 views

Regex to check for a space before a set of numbers

I am working on a validation rule (potentially looking into other methods later) that will prevent users from putting a credit card number or social security number in a text field. The issue i am ...
1
vote
1answer
34 views

Validation Rule for SOQL date literals

I have some custom metadata used to configure various scheduled batch jobs. The custom metadata fields allow entry of a string that is used in a SOQL query as a date literal filter For example, the ...
3
votes
2answers
90 views

How to avoid duplicate look up combination in many to many realtionship?

I am trying to learn many to many relationships for salesforce objects, I was able to implement it using a junction object where there are two master-detail relationships. But it causes a duplicate ...
0
votes
1answer
47 views

Validation Rule CONTAINS

Use Case: When a NEW Opportunity of a particular RecortType is created, AND the OpportunityOwner Country = 'United States' AND the OpportunityOwner Role has the word 'Sales Manager' THROW AN ERROR IF ...
1
vote
1answer
17 views

Validation Rule not working when numbers are added

OR( CONTAINS("Post Office Box:P.O. Box:PO Box:Post Box:Box:P O Box", ShippingStreet ) ) The validation fires when we enter PO Box / Post Office Box / Post Box, but when it is entered with ...
0
votes
0answers
35 views

How can I create a validation rule based on three picklist values and other values?

I currently have a validation rule that reads: AND( OR( RecordType.Name == 'Proposal', RecordType.Name == 'Landscape', RecordType.Name == 'Forecast' ), ISPICKVAL(...
0
votes
0answers
20 views

Validation rule that checks text value against future year and current year

I have a picklist field with the following values: 2020-2021 2021-2022 2022-2023 2017-2018 2018-2019 2019-2020 2023-2024 2024-2025 2025-2026 Is it possible to create a validation rule that would ...
1
vote
1answer
14 views

Validation rule on lead conversion for new accounts only

What I am looking for is a way to run a validation rule and have it stop in its tracks if the Company type is not filled out on new lead conversion. here is what I have written so far ISCHANGED(...
0
votes
1answer
14 views

Add 3 months to the Opportunity start Date field

I have a field membership start date and the validation rule need to fire when the membership start date is 3 months later than today it has to throw error. Data type of membership start date is "...
1
vote
1answer
25 views

Disable managed validation rules via API

I have a requirement to disable validation rules in a managed package via API. I have tried using the Tooling API and update the validation rule object to deactivate it, but the issue is that I have ...
0
votes
0answers
21 views

Validation rule that requires fields to be filled out before change of Opp stage except for particular country

This is the Validation Rule I have created so far, what I need is to include - VAT field on the Account can't be blank except when the Account Country field says USA AND( NOT(ISBLANK( Account....
1
vote
1answer
25 views

Prevent stage changes if fields on the stage are blank

I want to prevent users from changing stages for cases if they don't fill out all the fields found on that stage. For example, on my first stage called 'Member transition started' i have a lookup ...
0
votes
1answer
38 views

Validation rule to prohibit several words in a text field

I am looking for a validation rule (to prevent coding) that prohibits certain words (in my case Department names in a Contact FirstName field) I want the list to be easily maintainable, so I hoped to ...
0
votes
1answer
38 views

How to restrict users from getting entered in a lookup field based on their permission set assignment using validation rules

I've a use case where Users having a PermissionSetAssignment X should not be allowed to be made owner of a custom object record by another users. I'm able to do this using a trigger but I've to make ...
0
votes
1answer
69 views

Validation Rule Triggered for another profile

AND( $Profile.Name<> "Quality Sales Rep", ISBLANK(ID__c)), True, False ) This is a validation rule which should trigger on the user object when ID field is blank while creating a new ...
0
votes
1answer
28 views

Validation rule - should not contain the values

AND ( NOT(Address = "P.O. Box","PO Box") ) Validation rule should fire when address has these values, when I tried to save the rule got Error: Syntax error. Missing ')'
2
votes
3answers
229 views

Validation Rule Logic - AND vs OR

I have a validation rule that is intended to prevent users from creating a Contact without converting a Lead. It contains exceptions to allow certain users to do it. Logically, all of the conditions ...
0
votes
1answer
47 views

Validation Rule on Opportunity references Account fields

I have created a Validation Rule on the Opportunity that it's referencing Account Fields, but it doesn't work accordingly. I have changed it a few times. I have created a picklist on the Opportunity: ...
0
votes
0answers
11 views

Validation Input in Flow don't get fired

I'm trying to create a validation rules in the flow Builder using the Validate Input in order to prevent some data insertion but it's not getting fired. I have a number Screen Component element (# ...
0
votes
1answer
32 views

Validation For Picklist [closed]

I have picklist Name Status__c and values are Active, Canceled, Closed And other filed is Amount__c. My requirement is when I choose Canceled or Closed values from Picklist the Amount filed should not ...
0
votes
1answer
42 views

Validation rule to restrict up to 3 repetitive characters [closed]

Can anyone please give me a Validation Rule syntax may be using REGEX to stop the duplicate 4 characters in a standard field.? Basically the field can accept aa, aaa but not aaaa. I want to restrict ...
0
votes
1answer
34 views

Validation rule working when manually entering values but not working when import using dataloader

I have the following validation rule on contact: OR(AND(MailingCountry = "Other Locations", ISPICKVAL(other_locations__c, "")), AND(NOT(MailingCountry = "Other Locations")...
0
votes
1answer
92 views

Validation is not firing due to before update trigger .how to fire validation

I have one validation rule which is checking account. Type == 'other' then throw error. I have before update trigger which is updating account. Type ="technical" when i deactivated the ...
0
votes
1answer
20 views

How to format enterprise number for Belgium businesses?

How can I put in place a control on an "Enterprise number" (basically the national ID for businesses) field to respect the format enforced by Belgium fiscal law?
0
votes
1answer
21 views

FIELD_CUSTOM_VALIDATION_EXCEPTION : No permission to send the Email based on the Case

The functionality Email-to-case is not working for me. When I am sending a Case to e-mail, a new case is not created. I am using the long service e-mail. When I changed the Automated Case User to ...
1
vote
0answers
43 views

Case Validation rule - using custom metadata type

I need to block certain email domains in order to create Email2Case. To meet this requirement, I have created A custom metadata type (Case_Block_Email__mdt) and a text field called Email_Domains__c ...
0
votes
0answers
101 views

Relating Custom Metadata Type records to Record Types with Validation Rules

I want to create Custom Metadata Types and related them to Record Types on different objects. I've created the custom metadata type and a metadata relationship field to an entity definition so that I ...
0
votes
2answers
115 views

Need help with Validation Rule in Master Detail relationship

I am new to Salesforce and need help in writing a validation rule. I have a Master object that can have multiple child objects.The child object has a field 'Type' with value lets say X and Y. If one ...

1
2 3 4 5
16