+ Start a Discussion
JoThoJoTho 

Validation rule which validate only while creation of record -solved

I thought of sharing a validation rule which will work only while creation of record and it will not work while editing the record

 

--> just give one additional condition as && ( ISNULL(CreatedDate )

 

(Since validation rule will check the createdDate field before its been created in DB)

 

 

Best Answer chosen by JoTho
Shannon HaleShannon Hale

You should probably just use ISNEW() for this sort of validation rule, as this function's purpose is to return true if the record is being created. It will make your formula more readable and maintainable to use functions like this that clearly state what they do, as opposed to a workaround that might need to be explained.

 

ISNULL() is deprecated and should not be used in new formulas. Use ISBLANK() instead.

 

See also:

ISNEW() help: http://help.salesforce.com/help/doc/en/customize_functions_i_z.htm#ISNEW

ISBLANK() help: http://help.salesforce.com/help/doc/en/customize_functions_i_z.htm#ISBLANK

All Answers

Saravanan @CreationSaravanan @Creation

good work

Shannon HaleShannon Hale

You should probably just use ISNEW() for this sort of validation rule, as this function's purpose is to return true if the record is being created. It will make your formula more readable and maintainable to use functions like this that clearly state what they do, as opposed to a workaround that might need to be explained.

 

ISNULL() is deprecated and should not be used in new formulas. Use ISBLANK() instead.

 

See also:

ISNEW() help: http://help.salesforce.com/help/doc/en/customize_functions_i_z.htm#ISNEW

ISBLANK() help: http://help.salesforce.com/help/doc/en/customize_functions_i_z.htm#ISBLANK

This was selected as the best answer
sandeep@Salesforcesandeep@Salesforce

Here you should also need to add one more condition tomake it more close to target logc you want to implement. like you need to add condition to check ISCHANGED(CreatedDate) && ISNULL(PRIOR(Createdate)).