You need to sign in to do that
Don't have an account?
Sameeer T
lightning button without action pop up
Hi All,
I have created component for lightning button 'Email Team Member'. This button has ability to open outlook email whenever I click on this button. So the problem I am facing currently is when I click on this button it's opening one pop up from where I have to click again on the button.
See this attached pictures here!
When I click on Email Team Member button above, below screen pop - up from where i have to click again on button.
Any help would be appreciated.
Thanks
you will have to write the logic , which is currently nehind button "Email Team Meber" click, in the init method of your lightnign component.
After that when you click on the quick action button it wll initailize the compoennt and will do required action.
You can call your button action from aura:handler init. or you can add your component to record page using lightning app builder
https://trailhead.salesforce.com/en/modules/lightning_app_builder/units/lightning_app_builder_recordpage
I hope it will help you
Regards
Ashif
Thank you for your reply :)
So currently what i have in lightning component is
<aura:component implements="lightning:actionOverride,force:lightningQuickActionWithoutHeader,force:hasRecordId,flexipage:availableForAllPageTypes" access="global" controller="PDM_RequestUpdatesProduct">
<aura:handler name="init" action="{!c.init}" value="{!this}"/>
<lightning:button variant="brand" label="Email Team Member" onclick="{! c.emailTeamMember }">
</lightning:button>
</aura:component>
Here is my lightning controller
({
emailTeamMember : function(component,event,helper){
var action = component.get("c.requestProductProgramRecordUpdate");
action.setParams({
"prodProgId": component.get("v.recordId")
});
action.setCallback(this, function(a) {
var teamMembers=a.getReturnValue();
console.log("team members are"+teamMembers);
if(teamMembers!=''){
window.location.href = "mailto:"+teamMembers;
window.close();
}
else
alert('No Team Members');
});
$A.enqueueAction(action);
}
})
So I dont want that action pop and instead wants that button to open outlook mail on first click.
You need to use emailTeamMember action in <aura:handler it will directly launch your mail popup