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
-
Leveraging AI to Enhance Sales Effectiveness13 Mar 2025 Use-case
-
Revolutionizing Manufacturing with AI: Predictive Maintenance, Supply Chain Optimization, and More11 Mar 2025 E-Book
-
NetSuite for Manufacturing: Streamlining Operations and Solving Key Challenges07 Mar 2025 Blog
-
How to Build Your First Agent in Salesforce Agentforce24 Feb 2025 Blog
-
ERP vs Salesforce Revenue Cloud: Which One is Right for Your Business?24 Feb 2025 E-Book
-
Revolutionizing Manufacturing with Salesforce: A Playbook for Efficiency & Growth18 Feb 2025 E-Book
-
Salesforce 2025 Game-Changing Trends You Need to Know28 Jan 2025 Blog
-
Agentforce 2.0: Everything You Need to Know About the Latest Update22 Jan 2025 Blog
-
The Ultimate Guide to NetSuite Development: Tools and Techniques10 Jan 2025 Blog
-
How Salesforce Nonprofit Cloud Transforms Fundraising Strategies10 Jan 2025 Blog
-
The Impact of Salesforce Development Partners on Small and Medium Businesses08 Jan 2025 Blog
-
Key Questions to Ask When Hiring a NetSuite Development Partner08 Jan 2025 Blog
-
Salesforce Agentforce Demystified: Your Essential Guide08 Jan 2025 Blog
-
Salesforce and NetSuite Integration: Driving Business Efficiency with Precision06 Jan 2025 Blog
-
Everest Group has positioned Mirketa as an Aspirant in the report24 Dec 2024 Press Release
-
Salesforce Einstein20 Dec 2024 E-Book
-
Order to Cash Cycle with NetSuite20 Dec 2024 E-Book
-
Empower Your Marketing Strategy with Salesforce Marketing Cloud's Automation Studio Activities13 Dec 2024 Blog
-
Salesforce CPQ for Subscription-based Businesses10 Dec 2024 Blog
-
Unleashing the Magic of Einstein Prediction Builder10 Dec 2024 Blog
Categories
Featured by



