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
jucuzoglujucuzoglu 

How to call a method in a custom controller passing a parameter

I have a custom contoller which displays information from 2 objects.

 

In the controller I list several fields from a child object in a TableBlock.

 

I would like to add a Delete button (or link) to the column so that a user can click to remove the record.

 

I have set up a method that recieves an ID and then deletes a record. However I am not certain how to call the method that I have created from the VisualForce page while passing a parameter.

kiranmutturukiranmutturu

if your delete is a commandbutton then you can use the action attribute to call the controller method and you can pass the parameters  also.... 

wAndwAnd
<apex:actionFunction name="ttt" action="youraction">
  <apex:param name="param" assignTo="***"/>
</apex:actionFunction>

 
And you can call this actionFunction with javascript like
youraction( objectId );