You need to sign in to do that
Don't have an account?
SFDC_Learner
Constructor limits
Hi
Can any one give me a list of points that we should not do with in constructor?
i know few like,
-> we should not do DML operations.
can you give more tips ?
The only limit I am aware of is you can not use DML statements in apex class constructor. Apart from this if you are using the same apex class as controller/extension for multiple pages, you can use initialize method (action function, will be invoked from page using the action attribute) to seperate the code for each visualforce page, this will avoid the execution of unnecessary code and will increase the performance.
I beleive below links can help you:
http://boards.developerforce.com/t5/Apex-Code-Development/Best-Practices-Constructor-or-Initialization/td-p/222271
http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_additional_controller.htm
http://wiki.developerforce.com/page/Apex_Code_Best_Practices
Thanks
Deshraj Kumawat