Activity Forums Salesforce® Discussions How to get selected records ID from List View using Javascript / Ajax Toolkit in Salesforce?

  • shariq

    Member
    September 22, 2018 at 6:41 pm

    Create a new Button on Lead of type List Button. Add the button on Lead List View Layout and write below Javascript code:

    {!RequireScript("/js/functions.js")}
    var recordsSelected = {!GetRecordIds($ObjectType.Lead)}
    for(var i=0; i < recordsSelected .length ; i++) {
    alert('Selected ID '+recordsSelected[i]);
    }

  • Parul

    Member
    September 23, 2018 at 5:46 am

    Create a new Button on Lead of type List Button and then Add the button on Lead List View Layout.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos