Lightning SALESFORCE

How to Add Hyperlink in lightning:datatable

How to Add Hyperlink in lightning:datatable Below are the Sample Code to add hyperlink in Lightning DataTable:- {label:’Website’, fieldName:’Website’, type: ‘url’, typeAttributes: { label: ‘My Website Name’, target:’_blank’}} Apex Class:- public class AccountController { @AuraEnabled public static List<Account> getAccounts(){ List<Account> acList…

Read More
Lightning

Value Binding with html elements in lightning Component

Value Binding with html elements in lightning Component HTML Markup: <a href=”javascript:void(0)” onclick=”{!c.onUserClick}” data-userid=”{!AccountDetail.CreatedBy.Id}”> {!AccountDetail.CreatedBy.Name} </a> Controller: onUserClick : function(component,event,helper){ var userId = event.currentTarget.getAttribute(“data-userid”); var navEvt = $A.get(“e.force:navigateToSObject”); navEvt.setParams({ “recordId” : userId, }); navEvt.fire() } (13)

Read More