1

I am trying to add a new validation rule ISNUMBER(number) on a number type field.

but it seems like I couldn't because I got a syntax error, Error: Incorrect argument type for function 'ISNUMBER()'

How could I validate this field and check if it's a number ?

3

4 Answers 4

4

You don't need to perform this type of validation on a Number field. ISNUMBER simply:

Determines if a text value is a number and returns TRUE if it is. Otherwise, it returns FALSE.

It will only accept a TEXT field as a parameter.

This type of validation is not required. The Salesforce Number field will perform that validation innately. You do not need to do anything for that validation to happen.

1

If you are trying to determine whether the field has a value or not, then use ISBLANK(field__c), but if you just want to require a value, make the field required in the field definition.

-1

As said Nick Cook, you need to pass a textfield.

ISNUMBER('12345') --> no error

ISNUMBER('Hell0 W0rld') --> error

-1

NOT(ISNUMBER( Contract_ID__c ))

1
  • 1
    Can you provide more explanations about your answer please ?
    – SF_user
    Nov 6, 2014 at 14:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .