+ Start a Discussion

Check Syntax makes my code disappear

I am using the free developer version of salesforce.  I have a formula field which I want to re-calculate when the status is set to closed.


I tried the following


IF(ISPICKVAL(Status__c, "Closed"), TODAY(),null)


Check Systax didn't like it so it just deleted it and pretended everything was ok by giving me a nice little green message saying so and then sticking its head in the sand.


How can I get Check Systax to pull its head out of the sand and tell me what it is upset about :-)


I also tried

IF(ISPICKVAL(Status__c, "Closed"), TODAY(),TODAY())


which is completely useless but Check Syntax got rid of it too.

Then I tried 


IF(1=1, TODAY(),TODAY())


and Check Syntax was happy so it didn't delete my formula which is completely useless.




Best Answer chosen by Admin (Salesforce Developers) 

Have you tried with single-quote-marks? ( ' instead of " )


IF(ISPICKVAL(Status__c, 'Closed'), TODAY(),null)