You need to sign in to do that
Don't have an account?
Heese
Help writing a validation rule
Hi,
I need help writing a validation rule.
I have an custom account field (picklist) named XYZ. I would like to create a validation rule for an opporuntity related to the account.
So if an opportunity is created and a picklist value other than N/A is selected it would require the user to type a hyphen into the Opportunity Name.
I saw this from a list of validation rules. FIND( " - ", Name ) = 0
Logically it sounds like this. If ISPICKVAL XYZ_c <> N/A Then require "-"
Thanks in advance
I need help writing a validation rule.
I have an custom account field (picklist) named XYZ. I would like to create a validation rule for an opporuntity related to the account.
So if an opportunity is created and a picklist value other than N/A is selected it would require the user to type a hyphen into the Opportunity Name.
I saw this from a list of validation rules. FIND( " - ", Name ) = 0
Logically it sounds like this. If ISPICKVAL XYZ_c <> N/A Then require "-"
Thanks in advance
You will need to utilize a validation rule similar to the one below.
AND(
ISPICKVAL(Picklist__c, "XYZ"),
NOT(CONTAINS(Name, "-"))
)
If the picklist equals the XYZ value and there is not a hyphen in the name field it will error out and not let them save.
$RecordType.Id = "01270000000DgCU",
IF(ISNULL(CloseDate) = FALSE,
OR(ISNULL(Funnel_Comments__c )), FALSE)
)
Message Edited by Enzo6034 on 06-04-2008 10:19 AM
Is this correct
AND(
$RecordType.Id = "01270000000DgCU",
OR(ISPICKVAL(StageName, "Closed Won"),ISPICKVAL(StageName, "Closed Lost"),ISPICKVAL(StageName, "Closed Walk Away")),LEN(Funnel_Comments__c) = 0
)
That looks correct. If you click on the SRC button when posting and placing your code in that dialog box it won't put all of the smilies within it.
Hi Chris,
Thanks for your help. I just have one more question. Do you know a validation rule based on a recordtype where the user can pick only among the 3 picklist values and if they pick something else an error would appear. I am doing this for existing opportunities where the user cant change existing stages but those. I have something I am trying below:
Thanks,
Joe
Message Edited by Enzo6034 on 06-04-2008 08:01 PM
Message Edited by Enzo6034 on 06-04-2008 08:01 PM
Hello,
I am aware of that but since this is an existing opportunity, i just want the original picklist but just limit it now to three values. If I change the picklist wouldnt it change the data in the old existing opportunities?
Thanks,
Joe
Hi,
I got another question. How do I make a lookup field required based on a recordtype using a validation rule?
Thanks,
Joe
It will be something like this: