Not working: Javascript to select all checkboxes from Header checkbox in Visualforce page

I am displaying a table with checkboxes using wrapper class. Now I want to add a checkbox to the header, when selected it should select all row-checkboxes and when deselected it should deselect all row-checkboxes, when I deselect one row-checkbox, Headercheckbox should get deselected (not working) AND When selected any checkbox should Enable button and … Read more

How to send an arrayList from Apex to Javascript and then to HTML?

I’m new in JS and can’t understand, what is wrong here (this is my test value, but then I want to send an arraylist’s elements): Apex: public String test{get;set;} public String myApexMethod(){ test = ‘Hello!’; return test; } JS and HTML: <apex:actionFunction action=”{!myApexMethod}” name=”getResult” rerender=”script_block”/> <apex:outPutPanel layout=”block” id=”script_block”> <script> var res = “{!test}”; window.onload=func function … Read more

Visual Force: Checking boxes individually triggers OnChange, but my CheckAllboxes page component does not

I have a table of items. Each item can be selected or checked with a checkbox, and an OnChange is triggered to pass its ID to Apex for a query that will quote the selected items. This works all fine for individual checking. However I just added a page component that checks all the items … Read more

apex:param get just last element. How to fix that?

I create delete-button to remove records from my list. First I choose records and add them to this list. Then I can delete some records, but it removes just last one. How to delete only selected record from the list? public void deleteObject() { for (Integer i=0; i < someList.size(); i++){ Job_Advertisement__c j = someList[i]; … Read more

Chaining Continuations – would each continuation be executed in separate transaction/limit scope?

When we are chaining Continuation objects in Apex controller, would it be right to assume that each continuation (and apex post processing method) is executed in separate transaction scope, e.g. I could have 100 SOQL statements in processing method for each continuation? Or does the whole continuation chain share the same execution context and should … Read more

Style apex select option in Bootstrap theme

Please help me to style custom picklist in bootstrap theme. So I have a controller with code: public List<selectOption> getSettings() { List<SelectOption> options = new List<selectOption>(); options.add(new SelectOption(‘Market/OTC’,’Market/OTC’)); options.add(new SelectOption(‘Margin Lending’,’Margin Lending’)); options.add(new SelectOption(‘Other Services’,’Other Services’)); return options; } And also the vf page with row: <div class=”form-group”> <label for=”Setting”>Setting</label> <apex:selectOption value=”{!SelectedSetting}” id=”Setting” > <apex:selectOption … Read more

Visualforce with AJAX toolkit Migration to Lightning

I have a Visualforce page exposed as a Tab with heavy javascript and it uses AJAX toolkit. We are in the process migrating to Lighting Experience and this page seems working fine at high level in Lightning and it even uses GETSESSIONID for the AJAX calls. Have you noticed any issues with similar pages in … Read more

Site profile doesn’t appear to have access to FirstName or LastName on Leads

I have created a public site to create Lead records. It seems as though the site’s profile has access to the composite Name field but not the FirstName or LastName fields. Eg: //This doesn’t Work Lead l = [SELECT Name FROM Lead LIMIT 1]; this.firstName = l.FirstName; //This works Lead l = [SELECT Name FROM … Read more

community view report via a VF page

Could a report exposed to a SF community (Not Plus), via a VF page? as below; <apex:page id=”ccs” title=”Customer Case Summary” cache=”false” showHeader=”false” sidebar=”false” standardStylesheets=”false”> <body> <div>Customer Case Summary<br/> <apex:iframe src=”00O90000009FCKe”/> </div> </body> </apex:page> I tried this and gave the permission to the VF via profile, it is still giving me no access error, According … Read more