In this post, I am going to post some useful questions and answer related to Salesforce Lightning environment.
- What are the type of events into Salesforce Lightning component
- What is the basic difference between Application Event and Component Event
- The major difference between application and component event is that component event is used in child to parent components and application event can be used through out the application.
- Which interface need to implement so that you can use lightning component as quick action.
- force:lightningQuickAction
- Which interface need to implement so that you can use lightning component as Tab like custom object and VF page.
- force:appHostable
- Can we use Lightning Component into VF page? If yes how?
- Yes, using lightning out functionality of salesforce lightning component.
- For more details see Here
- How can we call child component controller method from the parent component controller method?
- Yes, we can call using aura methods.
- Salesforce Document
- What are the different Lightning component bundles?
- Component
- Controller
- Helper
- Style
- Document
- Design
- SVG
- Rendrer
- More Info Here(Salesforce Document)
- What is the use of Document and Rendrer in lightning component?
- Document: – A description, sample code, and one or multiple references to example components
- Client-side renderer to override default rendering for a component.
- How to ensure FLS while working with Lightning Component?
- Lightning Data Services already ensures Field Level Security and we can also use into the Apex using isAccessible, isCreateable, isDeleteable, isCreateable and etc methods of Schema class.
- Why we should go for Lightning Component instead of VF pages?
- See Here
- Can we use fieldSet in the lightning component?
- Yes. We can use Lightning:RecordForm and provide the list of the Fields in fields attribute. For more information Refer Here
- How to navigate from one component to another component.
- We can use force:navigateToComponent
- OR we can use lightning:navigation
- Can we use PageReference in Lightning Component?
- Yes
- How to call Parent Component method from child component without using events?
- Yes. By using aura:action but the recommended way is to use Component Event.
- Comming soon!!!!
Happy reading and All the Best 🙂
I will keep updating the questions and answers.
Sharing is caring 🙂
How to call Parent Component method from child component without using events?
Yes. By using aura:action but the recommended way is to use Component Event.
==>This is wrong. It should be aura:method
This is not wrong. To call the Child Component JS Method we aura:method and to call the Parent Component JS method we aura:action. The question is for calling the Parent JS method from Child so the answer is aura:action
Hope your confusion is clear.
Thanks & Regards,
Amit Singh