Here I'm posting some important facts may ask in interviews,hope these are helpful for you.
- If a Controller Extension extends Standard Controller,the logic from the standard controller does not execute in system mode,instead its execute in user mode.In which the permissions, sharing rules,field level security of the current user apply.
- The view State Size of visualforce page must be under 135kb.By reducing view state,page can be load quickly.
- Use Transient Keyword in apex controllers to define variables,that aren't essential for state maintaining,aren't necessary during page refreshes.
- In BatchApex,by using DATABASE.QUERYLOCATOR object returns 50 millions of records,if more than 50 millions records are returned,batch job is immediately terminated and marked a fail.
- The Default Interval value for Apex:ActionPoller is 60 sec,its must be 5 sec or greater .
- Use CustomController When you want to run visualforce page entirely on system mode.
- All Asynchronous calls made after the starttest method is collected by the system.when stoptest method is executed,all asynchronous processes are run synchronous.
- Any code that executes after the starttest method and before the stoptest method is assigned to new governor limits.
- SOSL query that is added to an apex test method returns a empty set of search results when testmethod executes.so use TEST.SETFIXEDSEARCHRESULTS system method to define a list of record id's that are returned by search.
- To start an asynchronous execution of unit tests and check their results,by using ApexTestQueueItem and ApexTestResult.The maximum number of test queue items and classes ,that you can insert into Apex job queue is greater of 500 or 10 multiplied by the number of test classes in the organization.
0 comments:
Post a Comment