Communication Between Lightning Component in Community Cloud
Author
February 26, 2021
Introduction to Community Cloud- Community Cloud is a digital platform of Salesforce. It is used to connect with your Partners, Customer, and Employees of your Organization.
Communication in Lightning Component
When we work in the Community, we use multiple Lightning Components and many time it becomes need to communicate between the two or many lightning component which is published in the community. Unlike CRM lightning component where we use to create an event whether it is application event and platform event and then we have to make one component as child component where we have to register the event by <aura:registerevent > and In Parent Component we have to handle the Event by using <aura:handler> also we need to include JS Controller of child and parent component which is a too long process for basic communication between the components.
So, the communication between the two lightning components in the Community is too simple. Here we do not need to create any kind of event and do not need to make any component as Parent and Child. In Community, it treats two components or many components as a friend with No Difference.
Let’s say you want to send the value of Name and Email entered in the First Component ‘Community_LC_cmp1’ and want to send the above value to Second Component ‘Community_LC_cmp2’
What you only need to do just refer the Community_LC_cmp2 in Community_LC_cmp1 like below:
Community_LC_Cmp1 Component:
<aura:component controller =’anycontrollerif needed’ implements=”force:appHostable, flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId, forceCommunity:availableForAllPageTypes,forcelightningQuickAction” acess=”global”>
<aura:attribute name=”uName” type=”String” />
<aura:attribute name=”email” type=”String” />
<aura:attribute name=”checkDetail” type=”Boolean” default=”false” />
<div class=”slds-col slds-size_1-of-1 slds-p-around_small slds-p-top_none”>
<div class=”slds-grid slds-wrap”>
<lightning:input aura:id=”userName” type=”String” label= “Enter Name” value=”{!v.uName}” />
<lightning:input aura:id=”userEmail” type=”email” label= “Enter Email” value=”{!v.email}” />
<lightning:button class=”send” variant=”brand” onclick=”{!c.sendDetail}” > Check </lightning:button>
<aura:if isTrue=”{!v. checkDetail }” >
<c: Community_LC_Cmp2 userName=”{!v.uName}” userEmail=”{!v.email}” />
<!—setting the attribute of component 2 –>
</aura:if>
Community_LC_Cmp1Controller.js
({
sendDetail : function(component, event, helper) {
component.set(“v.checkDetail”,true);
}
})
Thus, Setting the <aura:attribute> of the second lightning component is too simple and easy just we need to User <c:componentName attribute=”attributeValue”> and we can the attribute value anywhere like in DML OR UI.
So, Working in the Community is too easy and features of salesforce Community are very useful for collaboration with your Customers which is very important for the exponential growth of the business.
If your Salesforce community is not set up till now so kindly reach out the Mirketa to make it set up and enjoy the benefits of Salesforce Community and Grow your Business.
Thank you
Pranshu Goyal, Director of Products at Mirekta, states: “We envision DSM to be used by every small to a medium-sized organization dealing with bad data and want to get rid of duplicates easily with no cost. We have faced issues dealing with duplicates in our organization. That inspired us to make a solution that is not only simple to use but can be used widely to make the organization’s data clean to make them more efficient and productive. We want DSM to be a solution for every organization looking for duplicate management capability better than the Salesforce out-of-the-box solution with no additional cost.”
Recent Posts
-
Salesforce Website Integration Boost Leads, Automation & Customer Experience11 Jun 2025 Blog
-
Driving Results in Manufacturing with Salesforce Manufacturing Cloud11 Jun 2025 Blog
-
Accelerating Growth with NetSuite SuiteCommerce02 Jun 2025 Blog
-
Salesforce Service Cloud Services streamlining operations29 May 2025 Blog
-
AI for Nonprofits: Mirketa & Exec Precision Webinar27 May 2025 Press Release
-
AI for Nonprofits: Use Cases, Tools & Implementation Strategies20 May 2025 Webinar
-
Javascript Frameworks for Salesforce Lightning Design System18 May 2025 Blog
-
Building a Smart Campus with Salesforce Student Information System: A Road to Smarter Education16 May 2025 Blog
-
Salesforce Nonprofit Cloud: Benefits & Consultant Role15 May 2025 Blog
-
Salesforce Consulting for Nonprofits: Maximize Impact09 May 2025 Blog
-
What to Expect from a Salesforce Admin Service Provider09 May 2025 Blog
-
Maximizing Efficiency with Salesforce Cloud Integration Services09 May 2025 Blog
-
Step-by-Step Guide to Salesforce NPSP Implementation09 May 2025 Blog
-
A Guide on How to Use Salesforce Agentforce for Manufacturing02 May 2025 E-Book
-
Choosing the Right Salesforce Integration Partner: A Complete Guide22 Apr 2025 Blog
-
Salesforce Higher Education: Transforming Modern Universities15 Apr 2025 Blog
-
AI Agents The Future of Business Applications09 Apr 2025 Blog
-
Why Purpose-Built AI Agents Are the Future of AI at Work07 Apr 2025 Blog
-
How the Atlas Reasoning Engine Powers Agentforce03 Apr 2025 Blog
-
Leveraging AI for Code Analysis, Real-Time Interaction, and AI-driven Documentation02 Apr 2025 Use-case
Categories
Featured by



