function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

How can i write ISNULL in apex code


Ankit AroraAnkit Arora

Is there any problem using (== null) or (!= null) ??



Ankit Arora

Blog | Facebook | Blog Page


Hi ShravanKumar,

          ISNULL  are used in the salesforce formula functions to check whether the field contain any value or not.

But in APEX instead of ISNULL, we can use null.


for ex:

select id, Name from account where Name = null; 


I hope this will helpful for you