A controller is one piece in the Model-View-Controller (MVC) architecture of Visualforce. A controller can be a standard or custom controller and extensions to controllers can written.

learn more… | top users | synonyms

1
vote
3answers
20 views

Method does not exist or incorrect signature: [String].getDescribe()

I've checked the other answers and googled alot, cant seem to find the answer to why this doesnt work: public List<SelectOption> AccountIndustryOptions = new List<SelectOption>(); public ...
2
votes
2answers
13 views

how to search a child record based on parent name in sosl

I have a search VF page (it is just like google search with text box). In this i am searching all fields of a object then retrieving records by sosl search (upto this functionality it is working ...
0
votes
0answers
12 views

Share (wizard-like) state between page with controller extension and page with controller

I have a custom VF page to create new or edit records of Type CustomObject__c. Via a Linker__c object such records can be related to other OtherCustomObject__c. To create such links I have a button ...
0
votes
0answers
8 views

Insufficient Privileges

I have picklist of values Lead and Opportunity, By default value of picklist is lead when I change change it to opportunity and again if change it to lead, it gives error of Insufficient Privileges.
0
votes
0answers
24 views

Incorrect code coverage in developer console

I have an apex class called RelationshipTreeController (RTC for short) and a test class called RelationshipTreeControllerTest (RTCT for short). I have written a test method that calls the search() ...
0
votes
0answers
15 views

Visualforce save all records with inline editing, sorting and filtering

I need to build an editable grid of a custom object with sorting and filtering and be able to save all edits. I was able to build the editable grid of the custom object like in this link. Then, to add ...
3
votes
2answers
27 views

Why is my locked record editable?

Why is my record locked? The record that the class below creates, when shown in detail view, has the 'locked' icon, and appears to be locked at first view, but- Why can I edit the locked record (Even ...
4
votes
1answer
77 views

How can I use the html (pass through) attributes in Salesforce

I have create a VF page which is accessible on mobile through which I can take pic and attach it to the selected record. For this I have created a input tag in html <input type="file" ...
0
votes
2answers
38 views

I can't execute a simple batch class in my controller

I was about to use a batch class and now I'm stuck cause It wont execute. I don't know why. Here's the code from my controller class: public ConstructorName(){ dispForecastSummary(); } public ...
0
votes
2answers
15 views

Sorting a list of checkBoxOption Error: One or more of the items in this list is not Comparable

I am attempting to sort a list a list in my class however I am running into the error above. The list comes from a method in another class. public static List< vCtrl.CheckboxOption> ...
0
votes
0answers
20 views

can we update the related list object data with standard controller as master object?

I have two objects quote and quotelineitem master is quote and related to quote line item quote---->quote line item Visualforce page : I have kept like this <apex:page ...
0
votes
0answers
12 views

when downloading last page of results not getting downloading here i am using Pagination Concept in VFpage

do{ for(Inv__c ip:(List<Inv__C>)EquipCon.getRecords()) { totalInvestList.add(ip); } Equipcon.next(); ...
2
votes
1answer
21 views

What is the use of calling a controller inside an APEX trigger? Is that a best practice?

I saw some posts related to APEX triggers and recently one below, Salesforce method to update doesn't get commited in which the trigger have few lines, ApexPAges.StandardController sc = new ...
1
vote
1answer
31 views

How to write test class for a controller with non dml statements

I have a controller without any dml statements. How can i write test class for the controller to improve the coverage area ? public with sharing class payslipController { public Decimal ...
3
votes
1answer
95 views

Controller Class Inheritance vs Multiple Controller Extensions

From reading the docs and dev forums, it seems that having multiple controller extensions can offer the ability to override methods, and keep class size/structure simple. Because these are things ...
0
votes
1answer
39 views

Custom VisualForce Page/Controller SObject only accessable by creator

I'm having an issue with a custom Page/Controller in that, it is fully operational in production if I (the creator, I'm also a system admin) access it, but to everyone else it displays the error ...
1
vote
2answers
25 views

apex:inputCheckBox selected attribute is not working

i write a small snippet related to apex:inputCheckBox <apex:inputCheckbox onclick="callRemoteFunction(this,{!num})" selected="{!isItemSelected}"/> i am facing error Unknown function ...
0
votes
0answers
32 views

Knowledge Article System.QueryException: List has no rows for assignment to SObject [duplicate]

I'm getting the following error in a knowledge article controller that i'm working on: Article__kav article1 = new Article__kav(); article1 = [select URLName, id, Title,Partners__c,Cisco_Account__c, ...
1
vote
1answer
94 views

Visualforce: Pass inputHidden value to controller variable

I am attempting to use jQuery autocomplete to pass values to my controller. Autocomplete doesn't seem to work with apex:inputField so I am forced to use an html input. The problem is I can't seem to ...
1
vote
1answer
22 views

How to show grand child record names in Pageblock Table

I have 4 objects A,B,C,D Visual force page written on A results showing in Page block table. Relationships: A--->B Master Detail C---> Junction Object for B & D REQ: Need to show D names along ...
1
vote
1answer
37 views

Opportunity Record Type Selection Page

I'm trying to create a visualforce page which clones the record type selection page when creating new Opportunities. I'd like the page to display opp record types based on the related account record ...
5
votes
4answers
139 views

Visualforce Controller Unit Test (VF page displays fullcalendar)

I've written a visualforce page (with the help of examples etc from the internet) to simply display an instance of fullcalendar.js. There's no buttons etc, it simply loads when clicked from the home ...
1
vote
0answers
31 views

Cancel with confirm message requires double click

I have a simple example of a custom controller and a VF page. I have a cancel button on the VF page that shows a confirmation message to save unsaved data before leaving the page. When I click on ...
1
vote
1answer
39 views

Creating the child record based on parent field

Opportunity-->Pif(Child) Opportunity-->Proposal(Child) I have a logic for for single PIF can able to create many propsals. Now Requirement is I have many PIF's and each PIF(PIF_GDS__c) have each ...
1
vote
1answer
44 views

Non editable fields in the runtime, can that somehow be overcome?

I try to do my dynamic filtering on the form based on an object values, entered by a user using apex:inputField. The object stays in memory and never gets inserted to the DB. When I try to assign ...
0
votes
0answers
36 views

apex:param value not getting assignTo the controller

I have create a VF page from where i am trying to pass the value to controller. I have a picklist on which when i change the picklist value i need to send this value to controller. But the changed ...
0
votes
1answer
65 views

Use Apex Controller variable into javascript in Static Resource

I have created a vf page and added some javascript into that vf page which is using controller variable : <apex:page controller="webstore"> <script> var username = '{!username}' ...
2
votes
2answers
114 views

Passthrough Page Fails to Redirect in Service Console

I am currently having an issue with my custom passthrough page where it operates correctly but, only when it is outside the service console. So when I am in the service console, any redirect ...
1
vote
1answer
61 views

2 level Wrapper class not working in wizard

I have a custom object Package__c which has various products(Product2 object) attached to it. On first page of wizard, user can enter quantity for Packages and then proceed to next page where he can ...
16
votes
2answers
337 views

How do I start to debug my own Apex code?

Sometimes questions are posted here that would best be answered by helping the questioner learn how to do their own debugging. (Remember that proverb?) I'd like to have something to link to on this ...
1
vote
2answers
739 views

Passing a value from Visualforce Page to Controller

How to pass a value from VF page to Apex Controller? I need to have a hidden field with pre-populated value inside VF page. Apex Controller must be able to read this value. How to do that? EDIT: By ...
1
vote
1answer
32 views

Can i use the inner classes which is declared in a controller in another class? Is that a best practice?

I have few inner classes that i declared in a controller. Now came the need to use the inner classes in some another classes and methods. That means i can instantiate and use the inner class instances ...
1
vote
1answer
37 views

List out of Bounds Visualforce email Template

This is driving me a bit insane. When I do a query run with the query editor and give it an id, it returns the values I need but for some reason, I am not getting anything in my email template when I ...
0
votes
2answers
102 views

Using jQuery to access a SF Controller variable

'lo everyone. I have been trying to use jQuery to access a variable in my controller and I have just not been able to put it together. So, I created a simple example to eliminate anything extra, but ...
2
votes
1answer
113 views

Apex Controller Calling Set Method During Search

I am working through the Visualforce Developers Guide and during the section on Custom Controllers, an example performs a search stating that it also executes the setter but does not explain why. ...
2
votes
1answer
286 views

How get value apex:inputField on Apex Controller

My problem is the following : I ask the user to select a value (<apex:inputField value="{!GDT_Activity__c.Sandbox_Name__c}" id="GDTservice" style="width:50%;">), and then compare this value and ...
2
votes
1answer
192 views

Create new record in one controller and pass Id to a second controller

Still pretty 'green' when it comes to Apex and I am having a difficult time with this one issue. So, I have a Visualforce page that replaces Orders to replicate the button 'Save and Add Product' ...
0
votes
1answer
30 views

Would prefixing the word “get” or “set” for method names in controller ran automatically without invoking?

i am just getting suspicious that prefixing the word "get" or "set" before method names in controller run automatically without invoking? Experts please clarify?
-1
votes
1answer
108 views

Apex repeat to manipulate data in list not working [closed]

I am using apex: repeat tag to repeat data in a textbox. I have a custom setting on the vf page and a number field. I want to concatenate both in a textfield. And repeat the concatenated values again ...
1
vote
1answer
142 views

How can I override clone correctly?

I have been trying to override the functionnality of the standard clone button. Writing in a custom controller, I tried: public PageReference clone() { new MyClass.MyException('HAAAAAA'); ...
5
votes
2answers
263 views

When to use Apex controller vs JS Remoting or REST

When developing a website or mobile hybrid application, what are the benefits of using the standard VisualForce page + Apex Controller design versus using a framework like AngularJS for controller ...
0
votes
0answers
42 views

Attachment, Blank page - Salesforce 1

I developed a visualforce/controller that will allow users to insert a picture in a record. I tried to use all the components that are supported by the Salesforce 1 app for this visualforce page. This ...
0
votes
1answer
122 views

Unable to upsert a value from <apex:inputtext>

UPDATE. Unable to upsert!! I modified the code in the previous post. Here's the original one.... public class dataTableCon { public List fb; public List<Feedback__c> getAccounts() { fb= ...
1
vote
3answers
177 views

Can't seem to pass param from VF page into my Controller

I want to pass a parameter from my VF page into a method in controller. VF <div id="output_table"> <apex:form > <div ...
0
votes
1answer
63 views

Passing Javascript Value to Controller is Nulling

I am trying to pass from my JS to my controller and in the console log, All the values appear correctly. When I check the controller they are all null. I have looked it over 1000 Times. It could be a ...
1
vote
2answers
153 views

How to display Opportunity amounts in a VF page inline for account over time period?

I am tasked with creating an inline view from the accounts view page that shows opportunity amounts (won-closed) for the 12 months of the year, a total amount field, and prior year amounts, associated ...
1
vote
2answers
128 views

Problem populating pageBlockTable with data from custom object through custom controller

In a controller I'm populating a list of objects: public with sharing class SubmittalDashboard { public list<Show__c> missingShow {get; set;} public void SubmittalDashboard() { ...
3
votes
1answer
51 views

how to use a Map in a controller?

I am trying to do a shopping cart functionality. I was able to do it using a list. But the problem is the cart are getting duplicates if the user adds or modifies the cart. I tried converting the ...
4
votes
3answers
993 views

How do I pass a parameter from component to a Visualforce page?

Can I pass a email value from a visualforce component to a Visualforce page? I have used components for reusing Company's logo and few images... <apex:component> <apex:image ...
1
vote
1answer
35 views

CommentCase's CommentBody always blank when set via Apex

I have a small problem that I'm hoping someone can help me with. I have a simple VisualForce page and controller to list and insert case comments. It displays comments fine but when I try to insert ...