In 2014, Salesforce introduced the front-end platform called Lightning. The the next generation CRM platform provides functionality to help customers close deals faster and smarter. Sales teams now can see and present data to their customers and potential customers in visualized ways.
What Is Lightning?
Lightning is a component-based framework. It allows components to be reused in different places within an organization. Therefore, admins can quickly customize pages for different needs from various users.
When it comes to lightning component development, lightning makes it easier and faster for developers to build and debug applications using front end tools. Three basic elements of lightning components are
- Aura component,
- Back end controller (Apex).
However, when many methods have same actions, naming problems come in. The action methods in Apex return some data that are normally are declared in the format getVariableName.
This action will be put on a queued action list. Here is a screenshot how it looks.
As a result, it creates an infinite loop which keeps firing getStrings function. The reason is that the queued action list has taken the method name, not the action variable. The queued action list fires getStrings function, inside the function, a statement puts function again into the list, and so on.
To avoid this problem, JS functions in JS controller can be named as getVariableNameFunction. Inside the functions, query action variables can then be named as getVaribleNameAction. By doing this, normal naming convention remains the same and can avoid confusion for Lightning framework when picking the actions up.
“We @ Techforce Services are specialized in Salesforce Development – Apex, Visualforce and Lightning, API Integrations. We also cover Salesforce Setup, Implementation & Customization”.
Talk to us to know how we can Simplify your Salesforce journey.