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
devloper sfdcdevloper sfdc 

i need case id when i click on button

Hi All 

Please help on this issue i am getting undefined value in alert message when i clicked in view detail button . I want to Id of the record when i clicked the button . 
This is my page 
User-added image

 dohandelClick : function(component, event, helper){
      var eventSource=event.getSource();
        var Id=eventSource.get('v.name');
        var navEvt = $A.get("e.force:navigateToSObject");
         alert(Id);
    navEvt.setParams({
           
     "recordId": Id
    
      
    });
    navEvt.fire();
    },
Dushyant SonwarDushyant Sonwar
You need to change the line to below
var id = event.target.id;
alert(id);
It will show the case Id.

https://developer.salesforce.com/forums/?id=906F0000000kAn0IAE