You need to sign in to do that
Don't have an account?
Sandeep Rahul PV
Aura component is not working in Partner community?
Hi Guys,
I have an aura component that displays a newly created record on the lead detail page and it is forking fine for salesforce inside org but not in the community portal. Please help me to resolve this.
Thank you.
sandeep.
I have an aura component that displays a newly created record on the lead detail page and it is forking fine for salesforce inside org but not in the community portal. Please help me to resolve this.
Thank you.
sandeep.
Aura: ==== <aura:component implements="lightning:availableForFlowScreens,force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global"> <aura:attribute name="Message" type="List" /> <aura:attribute name="body" type="string" /> <aura:attribute name="eventRecevied" type="boolean" /> <lightning:empApi aura:id="empApi" /> <aura:handler name="init" value="{!this}" action="{!c.doInit}"/> <aura:if isTrue="{!v.eventRecevied}"> {!v.body} </aura:if> </aura:component> Javascript: ======== ({ doInit : function(component, event, helper) { const empApi = component.find('empApi'); const channel = '/event/SlickTextToastEvent__e'; const replayId = -1; empApi.subscribe(channel, replayId, $A.getCallback(eventReceived => { // Process event (this is called each time we receive an event) console.log('Received event ', JSON.stringify(eventReceived)); const body = component.get('v.Message'); body.push(eventReceived.data.payload.Message__c); console.log('Received body ', eventReceived.data.payload.Message__c); console.log('Received body ', body); component.set('v.body',eventReceived.data.payload.Message__c); component.set('v.eventRecevied',true); helper.helperMethod(component, eventReceived.data.payload.Message__c); })) .then(subscription => { console.log('Subscription request sent to: ', subscription.channel); }); } })
Do you see any error when you say it is not working in the community portal? Thx