function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Abishek NDAbishek ND 

I have doubt about how to create lightning component with these buttons


Button 1 - to refresh the page onclick
Button 2 - to display the success toast message (Which contains record id)
Button 3 - Navigate to www.google.com  (use navigate to URL ) 
Asma SalesforceAsma Salesforce

Hi All,

Can you please tell me how I can post a question on this website?
I am not able to find it please help me.

Thank You

Abishek NDAbishek ND
you can add some topic for the questions, so that you can write on the text box below the topic message
CharuDuttCharuDutt
Hii Abhishek
try Below Code
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
	<lightning:button label="refresh" title="Warning" onclick="{! c.handlerefresh }"/>
    <lightning:button label="Warning" title="Warning" onclick="{! c.handleWarning }"/>
    <lightning:button label="google" title="Warning" onclick="{! c.handleNewWindow }"/>
</aura:component>


Controller

({	handlerefresh: function (component, event, helper) {
      location.reload();
    },
	handleWarning : function (component, event, helper) {
        var mssg = "warning";
        helper.showToastMessage(mssg, event);
    },
    handleNewWindow: function (component, event, helper) {
       window.open("https://www.google.com");
    }
})




Helper

({
	showToastMessage : function(mssg, event) {
        var toastEvent = $A.get("e.force:showToast");
        toastEvent.setParams({
            mode: 'sticky',
            message: "You clicked: " +  event.getSource().get("v.label"),
            type : mssg
        });
        toastEvent.fire();
    }
})
Please Mark It As Best Answer If It Helps
Thank  You!