What is the use of transient keyword in Salesforce?

Declaring variables as transient reduces view state size. A common use case for the transient keyword is a field on a Visualforce page that is needed only for the duration of a page request, but should not be part of the page's view state and would use too many system resources to be recomputed many times during a request.

The transient variables are not passed to view state and therefore not stored in View State.

Check the below link for more info



No comments:

Post a Comment

Sharing is Caring!!! Share this with your friends!!!

submit to reddit