You need to sign in to do that
Don't have an account?
Cheri L.
Visualforce button to update boolean field from listview
Novice developer here, trying to adapt Trailhead code (https://trailhead.salesforce.com/content/learn/modules/lex_javascript_button_migration/javascript_button_alternatives)to a somewhat similar use for class attendance. I want the following to happen —
And here's my code that doesn't work as I want it to —
- user clicks multiple boxes on a list view of enrollees
- user then clicks a Visualforce button ("Mark Present") to update the Attended checkbox on each record (also shown on the listview)
- the listview then shows all the checked boxes with minimal obvious refreshing, and definitely no new page returning
And here's my code that doesn't work as I want it to —
<apex:page standardController="Session_Participation__c" recordSetVar="attendees"> <apex:form > <apex:pageBlock title="Mark Present" mode="edit"> <apex:pageBlockTable value="{!selected}" var="att" id="attended"> <apex:column value="{!att.Enrollee__c}"/> <apex:column value="{!att.Attended__c}"/> <apex:inputField value="{!att.Attended__c}"/> <apex:actionSupport event="onclick" immediate="true" action="{!save}"/> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page>I'd be grateful for help!