+ Start a Discussion
padmaja shivane 4padmaja shivane 4 

how to asign status to checkbox when it is true

one checkbox is on my vf when this checkbox enable then related incident must be changed there status
plz can you me the solution ,how to assign status to this checkbox
are Incidents related list? if so then you can simply write a javscript code ionchange on checkbox which will call some apex controller method to save the status of incidents.
padmaja shivane 4padmaja shivane 4
can you give me the javascript code
Hi Padmaja,
when your check box is true it will change the some other information in your page right,
use the actionsupport for check box and event is onchange and write your logic in your apex method
<apex:checkbox value={!obj.checked} event="onchange">
  <apex:actionsupport action="{!checkedmethod}" />

public void checkedmethod(){
update obj;

plz:check syntax