A custom controller is an Apex class that uses the default, no-argument constructor for the outer, top-level class. You cannot create a custom controller constructor that includes parameters.

learn more… | top users | synonyms

0
votes
2answers
15 views

How to save standard object in custom controller?

I want to create a form which when submitted will then create a record in Lead object. But I'm unable to fetch the values submitted by the user. Where am I going wrong? Apex Class public class ...
1
vote
1answer
32 views

Test Class for Chart Controller

Below is a Visualforce Chart Controller example directly from the offical documentation. https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_charting_overview_simple_example.htm ...
0
votes
0answers
10 views

I wanna populate a value in the field equal to the number of times an <apex :outputLink> has been clicked

My requirement is to have a Downloads button on my Account page,that displays a number which is determined by the number of times a user has clicked on the "Download" link on a VF page. How can I ...
0
votes
0answers
22 views

Using UPDATE with an Array - is it possible?

I have a controller with a variable that is output as an array - and I would like to use UPDATE to give my users the ability to make in-line edits to records displayed an a VF page. Is this at all ...
0
votes
1answer
38 views

I wanna achieve pagination on a visualforce page via custom controller class

I want to achieve pagination on a visualforce page with the help of custom controller,right now my code is not working as expected. Can anyone please help me in what I am doing wrong? My code is as ...
0
votes
3answers
42 views

VF: On Click not working

It appears I have something wrong in my syntax for the output panels but I can't figure out what it is. Can someone tell me what I am doing wrong? The page doesn't rerender when I click the account ...
1
vote
2answers
42 views

Test Class for Redirect Custom Controller

I have a fairly simple custom controller that redirects to various pages based upon selection of record type when creating a new Case from an Account or the Case tab. I am trying to develop a test ...
0
votes
3answers
29 views

VF Email Template Error - Attempt to de-reference a null object

Hello everyone I am trying to get my visualforce email template to work this component is used on the Opportunity and Contact Objects. Both email templates are showing the Error occurred trying ...
0
votes
1answer
34 views

Compile Error: Invalid Type

I am working towards getting my controller to pass queries into a visualforce gauge component. The first part works in that I can make a query convert to an integer and display on the chart. I want to ...
-1
votes
1answer
26 views

Custom Controllers in Salesforce [closed]

What it means - private final Account account. Please expalin this line by line public class MyController { private final Account account; public MyController() { account = [...
3
votes
3answers
200 views

Please explain how apex controller works

I don't understand why the following controller updates an account. My thoughts that there should be public void setAccount() {...} method so changes in view will be available in controller. Custom ...
1
vote
1answer
40 views

Custom controller, default object values, and validation. How can I get all three to work in harmony?

I have a Visualforce page that is backed by a custom controller. The custom controller has a public property of type Event (called ThisEvent) that the Visualforce page uses to bind to several input ...
3
votes
2answers
38 views

Why are my validation messages not displaying on my Visualforce page?

I have a Visualforce page with a custom controller. Whenever there is a validation error on saving, the user is shown a white page with the text SObject row does not allow errors: I have followed ...
1
vote
2answers
53 views

How to Create a Date Input Field

How can I create an apex input with data type date? I tried using showDatePicker but it has an error: value for <apex:inputField> is not a dynamic binding.
3
votes
2answers
74 views

Why are you forced to have an empty method to use a method with input parameters? [duplicate]

I'm calling an apex controller class method from my visual force page using an actionFunction like so: <apex:form > <apex:actionFunction name="FunctionName" action="{!...
2
votes
1answer
20 views

Implementing CompareTo In An Inner Class That Needs Outer Class Data

I'm using Apex and VisualForce to make an "open house event check-in page" for a department. For various reasons pertaining to AppExchange plugin compatibility, we are storing a separate "Event" ...
1
vote
2answers
65 views

Making VF page list items (custom object & controller), go to detail page, add 'return' button?

I am creating a page to be placed on my customer community site that will show contractual employees their past/present/future events on a list. My goal is to be able to click those list items and ...
1
vote
2answers
63 views

Reference a child field in grid or create grid from standard controller

Is it possible to reference a child field in a grid when using a standard controller from an object? Or do I have to create a custom controller? If I do have to create a custom controller then do I ...
0
votes
1answer
38 views

Solution to optimize code that exceeds limits of 50k rows returned

I would need guidance over how to avoid getting de 50k limit rows on one visualforce page that monitors the transactions that are going to be made on the present day + 2 next days, shows a lot of ...
0
votes
1answer
39 views

Test Code Coverage on VFP with SOQL query

Have a custom object that we are using to document our refreshes to our sandboxes. We are attempting to put this data onto a VFP so we can expose to non-licensed Salesforce workers using a Force.com ...
1
vote
0answers
105 views

Dynamic Search Page using wildcards

I have a requirement to be able to search in the Case standard object in fields such as Subject (text 255) and Description (long text area 32000) using wildcards. I found Jeff Douglas codes(http://...
0
votes
1answer
72 views

Test class for custom controller [ pass the public string from vf to controller ]

i am neophyte to test class. here's my issue. i use custom controller and i use public string to get the all value from my vf. how do i pass all the value on my test class ? --Apex Class-- public ...
0
votes
2answers
40 views

Compile Error: Initial term of field expression must be a concrete SObject

I have a custom controller extension below which pre-populates the Opportunity ID and a Contact Role ID to a Visualforce page for a custom object that has a Master-Detail relationship to the ...
0
votes
1answer
46 views

Pre-populate Formula Fields to Visualforce Page

I have a custom object with a Mast-Detail relationship to the Opportunity. I am trying to create a Visualforce page that will pre-populate fields based upon values in the Opportunity and Account. I ...
3
votes
1answer
172 views

Why do I get a String to System.SelectOption conversion error?

I'm getting the following error when I click on the commandbutton in my Visualforce page: EXCEPTION_THROWN [EXTERNAL]|System.TypeException: Invalid conversion from runtime type String to System....
7
votes
1answer
253 views

Visualforce components within components

Fairly new to creating Visualforce components and I'm attempting to reuse some of my front-end mark up with multiple components that used in a parent component. At first I question if this was ...
3
votes
3answers
127 views

Standard Controller OR Custom Controller

When and how to decide whether to go with Standard Controller OR Custom Controller? I have created so many vf pages,classes, extensions but still I'm not sure to include standard controller or custom ...
0
votes
2answers
61 views

getting input data from VF page to controller

I am trying to get a date value in a VF page and transfering it to a custom controller using a custom object reference Ticket__c. This says i am trying to deference a null object. How can i get the ...
0
votes
1answer
115 views

Accessing custom object fields on visualforce page from custom controller

I am writing a custom controller and a visualforce page to take the input data from vf page and process the logic in controller. Here in vf page I am trying to pass two data values of different ...
0
votes
2answers
40 views

How to add new fields to a VF page when they are not included in the custom controller used for the page

I have a custom controller and VF page which allow my users to create and save a contract by using several information fields on the opportunity and related account page. Since this was first created, ...
0
votes
1answer
51 views

Opportunity Contact Roles in VF Controller

I have a custom Visualforce controller that applies to a custom object (SF__c). This object has a master-detail to the Opportunity object. My controller pre-populates the SF__c object with the ...
0
votes
1answer
495 views

Override Standard New Button with Visualforce Page

I have a custom object that has a Master-Detail relationship to the Opportunity object. I created a Visualforce page that I want to use to override the standard "New" list button on the related list ...
0
votes
1answer
27 views

displaying information from 2 different tables

So i just started out learning visualforce and i am stuck. I am trying to create a table that contains information from 2 different objects. One object is Account and another is contact. So far the ...
0
votes
1answer
63 views

Test Class - Controller/Component For Data List Only

I've been struggling for a few days now on this and just cannot find the answer. What I have is a controller that simply passes a list through based on two criteria. The controller is used by a ...
0
votes
0answers
72 views

Including child object's attachment in VF email template

Scenario- Case has a child object (a custom object - sample_case_child__c) which may have some file attachments on it. Goal - when a case is sent for approval, the email sent must include some ...
0
votes
2answers
65 views

Pagination methods aren't working

After a great deal of searching and effort, I've finally got a working controller that can show ContentVersion documents and paginate them. Upon testing it, though, I found that the Next button wouldn'...
0
votes
1answer
39 views

Custom controller to call one specific record from a custom object

I created a custom object named 'Live_Chat_Switch__c' with one custom field 'Enable_chat__c' (boolean) and I would like to call that field of a specific record on a VF page. To do so, I created a ...
0
votes
0answers
116 views

write a test class that gets a Flow.Interview

I have created a Flow that creates a "quick case". I have a VisualForce page that has a "Quick_Case" apex class as a controller that gets the Flow and returns the landing page once the case is ...
1
vote
4answers
976 views

TrailHead - Creating and Using Customer Controllers “bounding”

Here is the criteria for the question: • The page must be named 'NewCaseList'. • The custom controller Apex class must be named 'NewCaseListController'. • The 'NewCaseListController' Apex class ...
1
vote
1answer
91 views

Create Visualforce Page with dependent multi-select picklist

I am new to Salesforce and trying to make a new VF page. I have three custom objects: Students (list of students) Course Details (course time, start date, room, etc.) Student Course Detail Junction ...
0
votes
0answers
64 views

Salesforce Controller Test: getAccounts method not filtering by profile

I have a custom controller that is intended to return a results set to a visualforce page for customized viewing. It works fine in production. When building my unit test for this controller, however,...
0
votes
2answers
50 views

How overriding works in standard/custom controllers?

1) If I have a standard controller and two extensions Ext1 and Ext2 and if both Ext1 and Ext2 have the save method, then whose save method will be called Standard controller's, Ext1's or Ext2's? <...
0
votes
1answer
60 views

CommandButton to Increase/Decrease Probability ln Visualforce

I have a Visualforce page that has a list of opportunities with their probabilities. I want to use commandbuttons to allow the user to increase or decrease the probability by 10% right in the list ...
2
votes
1answer
266 views

Visualforce component on page - not rerendering after onclick event

I'm attempting to rerender an apex:outputPanel containing a visualforce component. When I click the panel containing the onclick code to call the controller method to change values and rerender, ...
1
vote
3answers
1k views

Passing URL parameters from VF page to custom controller

How can I take a URL parameter and pass it to a custom controller method? For example, I have a button from a case that goes to VF page with its ID in the url. (ex - https://visual.force.com/apex/...
1
vote
1answer
23 views

How to generate Helper class runtime

Is there a possibility or did anyone tried to generate an Apex helper class based off certain conditions runtime. I am thinking this just for LEARNING prospective. This will also reduce the number of ...
1
vote
1answer
400 views

Illegal assignment from Schema.SObjectField - apex code [duplicate]

Do I have to load that in List only ? I'm coming from .Net background and still learning how does the SF works... PS: Schedule__c is a custom object and trying to access the field from. Error: ...
3
votes
1answer
77 views

Duplicate Value Found: <unknown> Duplicates Value on Record With Id: <unknown>

I am getting this problem while saving the following controller class class public class NewAndExistingController { public Account account { get; private set; } public ...
2
votes
3answers
326 views

Apex:CommandButton sending data to controller

I'm trying to create a visual force page with a table and a "request" button that will take the selected row and append it as a task. Here's a photo of the table: When a user hits request, I want ...
11
votes
5answers
9k views

Apex Controllers: What do the get; set; do?

I've built a few apex controllers, and like most people have copied some code from here and there. In the controllers, there's typically an expression that looks like the following: public *var type* ...