Posts

Showing posts with the label getter

Salesforce Fact #606 | getters in Address class

Image
We have a couple of getter methods in Address class. So, while fetching the address field values in SOQL, it is not needed to select each address part field. We can make use of these getters to get the data. Reference:  https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_system_Address.htm#apex_system_Address_getCity Attached are the screenshots.

Salesforce Fact #576 | Access getter in LWC JS file

Image
The getters can be accessed in JS file like the way we can access in HTML file in LWC. If we refer the api property as this.<property name> in JS file it will call the getter function. Attached is the screenshot.

Salesforce Fact #1 | VF page load

Image
The order of invocation of constructor, getter and action method when a visualforce page is loaded is as follows: constructor -> action method -> getter Attached are the screenshots. (Please excuse the apex class and VF page names)