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
Gaurav Sinha 27Gaurav Sinha 27 

call action on hyperlink click in lightning datatable record

Hi All Veterans

I Have created a lightning data table as below:
component.set('v.mycolumns', [
         {label: 'Name', fieldName:'Name', type: 'url', sortable: true,
          typeAttributes: {label: { fieldName: 'Name' }}},
             {label: 'NON-LATIN NAME', fieldName: 'Non_LatinName__c', type: 'text', sortable: true},
             {label: 'ADDRESS', fieldName: 'Address__c', type: 'text', sortable: true},
             {label: 'City', fieldName: 'City__c', type: 'text', sortable: true},
             {label: 'City Region', fieldName: 'CityRegion__c', type: 'text', sortable: true},
             {label: 'State', fieldName: 'State__c', type: 'text', sortable: true},
             {label: 'Country', fieldName: 'Country__c', type: 'text', sortable: true},
             {label: 'MDCP Id', fieldName: 'MDCP_Id__c', type: 'text', sortable: true},
             {label: 'DUNS', fieldName: 'DUNS__c', type: 'text', sortable: true},
             {label: 'Domestic DUNS', fieldName: 'Domestic_DUNS__c', type: 'text', sortable: true},
             {label: 'Global DUNS', fieldName: 'Global_DUNS__c', type: 'text', sortable: true},
             {label: 'Tax ID', fieldName: 'Tax_ID__c', type: 'text', sortable: true},
             {label: 'Is Competitor', fieldName: 'Is_Competitor__c',type:'boolean', 
              "cellAttributes": {"iconName": { "fieldName": "IsCompetitor" },sortable: true}},
             {label: 'Out Of Business', fieldName: 'isOutOfBusiness__c',type:'boolean',
             "cellAttributes": {"iconName": { "fieldName": "OutOfBusiness" }, sortable: true}},
         ]);

I want to call an action on click of hyperlink created in column1. Need your expert advice for the same.
Thanks and regards
Gaurav Sinha