Activity Forums Salesforce® Discussions How to pass records on onclick for apex checkbox to controller in Salesforce vf page?

  • Piyush

    Member
    December 12, 2019 at 7:21 am

    Hi Deepak,

    create a variable in your controller

    public String selectedLetterID {get;set;}

    Then set it with the param tag.

    <apex:inputfield value="{!letter.Suppressed__c}" id="suppressBox" onclick="SupressLetter('{!letter.Id}');return false;"/>
    <apex:actionFunction name="SupressLetter" action="{!suppressLetter}" rerender="out">
        <apex:param name="firstparam" assignto="{!selectedLetterID}" value="" />
    </apex:actionFunction>

    for more check:-

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

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos