Validation rules help assure entered data meets basic requirements for consistent and clean data.
2
votes
1answer
77 views
Can a textbox be enabled after a certain value from a picklist is selected
I am having a picklist field which has 3 values 1.Web, 2.Mail, 3.Other.If i select other then the text must be editiable. If i select web or mail then the textbox must in uneditiable mode. Kindly tell ...
1
vote
1answer
33 views
Validation error message shows for all Inputfield in pageblocktable
I have a custom page with standard controller and extension. I have a page block table with inputField to display the account lookup. When the page is submitted with the wrong Account value in account ...
1
vote
1answer
41 views
Validating that at least one record in a class has a specific field checked
I have a class that allows users via VF to select custom contact roles for their opportunity. I need them to select at least one (or only one) of the contacts as primary. I know this should be ...
2
votes
1answer
33 views
Vlookup function
Object A has a price. We change it sometimes. When an order comes in for object A, I'd like the price to not change.
Order has a lookup to object A.
We're trying to produce a validation rule so ...
6
votes
2answers
56 views
Can I make a field un-editable after time?
Does anybody know of a way to make a field un-editable after 24 or maybe 48 hours of the creation of a record ?
Thank you.
1
vote
1answer
44 views
How to clone an Opportunity with null required fields
I would like to Clone an Opportunity with required fields (enforced by validation rules) which have not yet been populated. It is therefore giving the users an error when they attempt to Clone on that ...
2
votes
3answers
163 views
Make Validation Rule bypass if TRIGGER is run?
Is there a way to make a Validation Rule BYPASS via it's logic when a Trigger is doing it's job?
I've already tried various methods including
setting a hidden field on the object in the Trigger ...
5
votes
1answer
130 views
How to implement validation rule on multi select picklist
Suppose i have a multi select picklist which has 30 items. Now i have to put a validation rule that "user can't choose all the items from picklist. Atleast one item should be available in available ...
6
votes
3answers
91 views
How to prevent spaces and tabs in a text field using validation rule
How can I prevent spaces and tabs in a string field using a validation rule?
5
votes
1answer
92 views
Disable Validation Rule with Apex Code
Is there a way to disable Validation Rule with Apex Code? I need disable a managed Validation Rule in all customer orgs.
5
votes
3answers
294 views
How to build a SalesForce Custom Button with “validation” rules
Need a custom botton on an opportunity page to execute a task only after a set of validation checks have been preformed. Meaning the button will only function IF a list of fields and pick-lists have ...
3
votes
2answers
71 views
Does an Inactive Validation Rule that references a Spanning Relationship count towards the limit?
I have a managed package with a number of Validation Rules on Opportunity that currently involve spanning relationships.
This has become a limitation when attempting to install into various customer ...
5
votes
1answer
133 views
I need a String method in a Trigger to validate if a Rich Text Area is blank
I need assistance in evaluating whether a Rich Text Area custom field is blank using an Apex trigger.
Rich Text Field name: Application_Workaround__c
I have tried the following within the context ...
3
votes
2answers
149 views
Global override for triggers, workflow & validation rules
I have seen a number of posts regarding implementing overrides for triggers, workflow and validation rules using custom settings/labels.
In practice / large complex Salesforce deployments are people ...
2
votes
1answer
35 views
Required Picklist from Custom Object view
When you add an new field to an object in Salesforce.com, it is possible to check the "Required" checkbox to make it mandatory for every data insert/update. I know it is possible to make it required ...
2
votes
1answer
76 views
Cross-Site Request Forgery (CSRF)
I have this method that is executed on page action:
....
public PageReference validatePage(){
Id someId;
MyObject__c myObj;
try{
someId = ...
2
votes
2answers
155 views
Is it possible to use a Validation Rule to enforce a text field is a valid Salesforce Id
I have a situation where there is a text field on an object that is a text field. That field needs to be a Salesforce Id (It is a pseudo polymorphic relationship).
Is it possible to enforce this ...
2
votes
2answers
195 views
Checking the way to stop duplicate names - validation rules or triggers
I have a custom object with name and a lookup to contact among other fields.
The need that i have is that i need to make sure that only record name should not be duplicated for a contact.
There can ...
3
votes
2answers
121 views
Prevent Case Close with Open Tasks
We need an error whenever a case is closed but there are remaining open tasks not completed. Is there any easy way of doing this? Also, is it possible to update a date field in the CASE based on the ...
1
vote
1answer
73 views
validation falure
I am getting following error.
java.sql.SQLException: ORA-20025:
ORA-06512: at "DOPEY.SACCESS", line 1295
ORA-06512: at "DOPEY.CACCESS", line 2438
ORA-06512: at "DOPEY.CACCESS", line 2369
ORA-06512:
...
2
votes
3answers
113 views
Validation Rule with $RecordTypeId
I need to write a validation rule based on the recordTypeId.
I would like to make sure that when the users selects a record via a lookup field the rule will check if the record chosen is of a specific ...
2
votes
3answers
986 views
Field's validation rules in a Visualforce page
Is there a way to re-use the validation rules applied to some fields in Salesforce to a Visualforce page automaticaly?
I have a CustomController right now supporting the saving process of a field, ...
1
vote
1answer
54 views
Determine if the current user is above the record owner in the role hierarchy
I am looking to write a validation rule that prevents everyone from editing a record in a certain status, unless they are above the record owner in the role hierarchy.
So for example here is my fake ...
3
votes
1answer
120 views
Button Validation Logic
I came across a simple example for validating that when a button is clicked, it verifies that something is true or false in the Record before allowing the normal button logic.
...
2
votes
1answer
118 views
How do I run an integer validation rule against a Number(x, 0) field?
I see in the Number documentation that Salesforce does some rounding, but I'm observing truncation. In the Number Validation Rules from Salesforce there is a Number Must Be an Integer validation rule ...
1
vote
2answers
485 views
Database DMLOptions and Apex Error Messages
We found an issue when portal users leave comments on our cases. Email notifications to the case owners were not being sent. So I did change the code to use the setoptions method.
The problem is that ...
-4
votes
1answer
76 views
I need Help on validation rules [closed]
I need assistance on creating Validation Rules on Account Object-
If the Vehicle Makes(Editable) field is populated, then the Franchise_Type_c must be populated.
If the Franchise_Type_c field is NOT ...
2
votes
1answer
240 views
Month validation in javascript
if the month was less than today's month then I should show an error message through javascript in visualforce page.......I have tried but unable to...here is my code
/*javascript*/
<script ...
1
vote
1answer
211 views
Error during mass update using APEX Data Loader
I am running into an issue when running an update using the mass data loader. I run the same update twice per week, however, this week, a new validation rule that I created is throwing a validation ...
0
votes
1answer
324 views
JQuery validation in VF page does not work in IE9
I have added jquery validation to my visual force page controls. The validation works fine in IE8 but not working in IE9. I tried the following to check what goes wrong.
Different versions of jquery ...
3
votes
3answers
825 views
How to bypass Validation logic in a Trigger
If I have a trigger that works fine (generally), but which is generating false results due to VALIDATION RULES, how can I tell the trigger to ignore Validation rules (if at all)?
Scenario:
Trigger ...
3
votes
1answer
162 views
How do I compare a formula field with a picklist in a Validation Rule?
I have a custom object with a formula text field on it pulling from the master object. I have a picklist field and upon saving want to check that the picklist value chosen matches the formula text ...
5
votes
2answers
222 views
apex:pageMessages includes the entire component tree path for a apex:inputText with required=“true”
I have a Visualforce page that contains an apex:inputText with required="true". It is nested within several component levels, such as a apex:pageBlockSectionItem, apex:pageBlockSection, apex:pageBlock ...
1
vote
2answers
278 views
Test Case Failing b/c of Validation Rule, But Should Be Passing Based on Debug Log
My test case is inserting and updating records that should be meeting the criteria of the following validation rule, but the test says that it is failing:
Validation Rule:
AND(
OR(
...
2
votes
1answer
56 views
Creating validation/filter/error/other rules for selecting records in a look-up field
Let's say I have a custom object called SALADS. SALADS has two field look-up relations to custom objects FRUITS and VEGETABLES. How would I go about creating a rule/error saying that, while creating a ...
4
votes
2answers
287 views
How can I use an ampersand character in a validation rule error message?
I have a requirement to display the following message when an opportunity has is closed won in the wrong situation.
Please make sure that the Renewal index field is filled in for all products, and ...
10
votes
4answers
1k views
How can we disable triggers, Validation Rules and workflow rules in salesforce org. [on off - switch]
How can we disable triggers, Validation Rules and workflow rules in salesforce org.
This becomes really needed and important when we are doing data migration(data imports) in salesforce.
The way I ...
1
vote
1answer
280 views
How to validate UTF-8 in regex
I have basic validation rules setup for name fields:
NOT(REGEX(FirstName, "^[A-Za-z\\. '-]+$"))
The goal is to only allow letters, periods, spaces, hyphens and apostrophes in the name field. The ...
5
votes
4answers
223 views
Generating notification for user to confirm that a field has the correct value
I have a custom field called Pipeline which is a required Yes/No picklist that defaults to No. When the user makes some specific changes to the record, and Pipeline=No, I would like them to confirm ...
1
vote
2answers
312 views
Trigger is not validate via data loader
Good afternoon everyone,
I have two custom objects in my org where I'll call him here and Object1 Object2, Object1 is master detail. I created a trigger in Object2 where caught all of the X values ...
3
votes
1answer
339 views
Validation Rule Error Message in other Language
I want to display the field validation error massage in other language (let say Spanish) on VF page without using java sript but with any availalbe SFDC inbuilt functionality?
Let Say First name is a ...
2
votes
3answers
275 views
Validating country codes
Our enterprise data systems maintain a list of 2-character country codes that I want to enforce inside Salesforce. I'm having trouble writing a validation rule that successfully does this.
The rule ...


