You need to sign in to do that
Don't have an account?
![varaprasad v varaprasad v](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
In Constructor we will use SOQL or NOT
Hi Everyone,
I have small doubt.
In Constructor we will use SOQL or NOT ?
Thanks to Advance.
I have small doubt.
In Constructor we will use SOQL or NOT ?
Thanks to Advance.
yes you can use the SOQL query inside your constructor. But Its not an best practice in salesforce. Because when the class is excute first the constructor will call so that time the query will be execute.
You can use SOQL in constructor. But you cannot perform any DML operations in constructor.