You need to sign in to do that
Don't have an account?
Jerome Scola
About Validation Rule
HI,All.
Can I create a Validation Rule for the following case? If I can, how to create it? Thanks.
There are two fields in my custome object : Family and TicketId. Family has a,b,c options
My requirement is:
If Family=b, then I want to the TicketId is unique.
Can I create a Validation Rule for the following case? If I can, how to create it? Thanks.
There are two fields in my custome object : Family and TicketId. Family has a,b,c options
My requirement is:
If Family=b, then I want to the TicketId is unique.
I think you can do this in validation formula field just use If function and put condition family__c == 'b'.
if true then ticketId can't be blank. (Here family__c is picklist right?)
family is picklist , ticketid is number.
I want the TicketId is unique, it doesn't matter if it's null. if there is a ticketId=1,then 1 can't be used for a new product when the family is b
Sorry my mistake in read the question. I thought you want to required that field.
anyways for unique the field depend on picklist.I think you have to use trigger.
in trigger just check first the picklist values is 'B' or not.if yes then query on that object with where cause where ticketId = 'bind this with current record's ticketid field'.
and if this list size is grater to 1 it means in data base the same value exist.
so add error on it.
got it?
I didn't find a place to create a trigger.
I refer to the documentation of this link https://help.salesforce.com/HTViewHelpDoc?id=code_define_trigger.htm&language=en_US
but it was not helpful