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
1answer
18 views

Action Function not working

I have to upload a file using HTML input file and create a case and attach it to file. I am ablt to acomplish this using Javascript. Now I want to send the case Id to the controller. But I am not ...
2
votes
1answer
45 views

Extension or Custom Controller?

I have a requirement, where I have to create a new custom VF page. Below image shown, is similar to my requirement. I want to build a page like below. When I will click New button, below page should ...
-1
votes
1answer
21 views

Action is not working

VF Page <apex:page controller="ContactsListController"> <apex:form> <apex:pageBlock> <!-- Contacts List --> ...
0
votes
1answer
18 views

Is there any functionality provided in Salesforce for generating wizard using default provided functionality ?

Is there any functionality provided in Salesforce for generating wizard using default provided functionality ? I don't want to generate custom controller for getting this functionality.
0
votes
1answer
21 views

How to create a selectlist populated by records that list lookup relationship records?

I have been stuck on this problem for days. Basically I have a select list populated by all records in the custom object "Sprint__c". When I select a record in that select list, I am trying to list ...
0
votes
0answers
27 views

Generating multiple VF Page instances

I would like to somehow generate hundreds of PDFs (with embedded images) from a VF Page / custom controller. This requirement is part of a bigger package that is already using a lot of SOQL calls. ...
0
votes
1answer
13 views

Attempt to de-reference a null object: Error though have data

I am getting the subject error for below piece of code , exactly at below line. Though I have data in call object.Can someone please let me know the root cause and guide towards it's remedy? error ...
1
vote
0answers
24 views

How to get value from one field to another field

I have two objects. Requisition SCMC__Requisition__c Purchase Order (PO) SCMC__Purchase_Order__c There is a field in Requisition i.e Requestor Notes to Buyer SCMC__Requestor_Notes_to_Buyer__c ...
0
votes
1answer
23 views

Error: Read only property 'StoreFrontController.productDisplay.quantity'

Error: Read only property 'StoreFrontController.productDisplay.quantity' Visualforce : <apex:page controller="StoreFrontController" tabStyle="Product__c" > <apex:form> ...
0
votes
0answers
24 views

How to move the value of a field from Object A to Object B

I have three objects. Requisition (SCMC__Requisition__c) Requisition Line Item (SCMC__Requisition_Line_Item__c) Purchase order (SCMC__Purchase_Order__c) I have a controller class which is used to ...
1
vote
1answer
22 views

Update picklist value after commandButton onclick event

I have two buttons on my visualforce page: <apex:form > <apex:commandButton styleclass="btn-lg btn-data" value="Value 1" onclick="setValue1()"/> <apex:commandButton ...
1
vote
1answer
17 views

Creating a Test Class for a Custom Controller with Standard and Custom Objects

I created a Visualforce page + a Customer controller in order for users get more depth in their searches so they can do it by Super Customers. I have a mixture of Standard and Custom objects and I am ...
0
votes
1answer
20 views

Need Page refresh each time Save method called

I have to refresh the page each time the Save method is called. Please find my page and code snippet here. Can someone help me here? Page : <apex:commandLink value="Save" action="{!savei}" ...
0
votes
0answers
34 views

passing checkbox value with javascript variable to Apex Controller

<script type="text/javascript"> function chckIsPrivate() { var isprivate = document.getElementById('{!$Component.theForm.searchresults.isprivate}').checked; } ...
1
vote
2answers
59 views

How to query custom object fields value and sum them before opportunity page load, Salesforce?

I have two Custom Objects: BigMachines Quotes ( Not Allowed to make any changes in this custom object ) Phoenix Quotes I Need to query values of Total from both custom object, sum them and set the ...
3
votes
2answers
53 views

Adding SOQL Query to untested Apex Class causes errors in other classes

I have been asked to manage a large salesforce organization and I am getting a strange error. I simply need to create a Visualforce Page and a Controller right now. I have been banging my head against ...
1
vote
1answer
20 views

How to display default 1st value from controller to my page?

There are 2 custom objects here Topic and task. Topic here displays the related topics and on click of particular topic its related task is displayed. What i need is to display the 1st topic records ...
-1
votes
2answers
39 views

Write Test class for custom controller having wrapper class that makes a HTTP callout [closed]

Hello All Can anyone please help me to write test class for my custom controller. Below is my custom Controller. public class InsertDataInToNewShopCtrl{ public InsertDataInToNewShopCtrl(){ ...
4
votes
1answer
44 views

Change error displayed when wrong ID type is used with standard controller in visualforce

I have a VF page that uses standard controller account. I want to modify the error message that is displayed when I type the wrong id (invalid) in the URL to avoid getting a message like this: (I want ...
4
votes
1answer
44 views

Assigning VF component attribute to a List controller class variable

I have a VF page using a standard controller, a component, and a custom controller for the component. I am trying to pass a list of sObjects from the standard controller to the component's custom ...
1
vote
1answer
51 views

Records truncated end of page in PDF

I have an apex PDF page. There are five different tabpanels to show records. Now when number of records increases the last record of last panel in a page gets segregated to the next page. In such ...
0
votes
1answer
41 views

Filter list of records in controller displayed in an apex:pageBlockTable

My code is based on code shared by another stackexchange user. https://stackoverflow.com/questions/26183938/visualforce-page-does-not-display-a-list-of-records-or-any-records-but-it-can-di Where in ...
2
votes
1answer
43 views

Custom object to track event attendance

I've created a custom object to add an 'Attended' checkbox for invitees to an event. I've created a visualforce page list the events with a link to the attendance page where they can see a list of ...
1
vote
1answer
24 views

Can I use this method as the argument in a ternary operator?

I'm using the jqGrid plugin for jQuery. In the jqGrid function, I want to pass in a value for the width, but I want to pass in the value depending on the outcome of a method in my controller. ...
2
votes
1answer
28 views

Test custom controller that does not use parameters directly

Given a custom controller that uses a record selected by a standard controller (not through id parameter), how can I ensure that the appropriate Custom_Field__c field is available in the unit test? ...
1
vote
2answers
34 views

getting Id in apex controller without using standard controller ApexPages.StandardController

I have one apex page IncForRep that rerefs a controller IncForRep. i have used this constructor public IncForRep(ApexPages.StandardController a){..} to use Id i=a.getRecord().get('id'); . I want ...
0
votes
1answer
24 views

Create Visualforce page that opens up on hyperlink

There is a VF page OpenIncidentsByRep that shows columns having User Names and no. of Incidents of that User, referring from Incident object in a single row. The Number field is an hyperlink. I need ...
0
votes
0answers
16 views

Filtering form insert on master-detail relationship

I have a form on my html based visualforce page where users can submit comments on a topic I post. I am using a Challenge custom object and a Challenge Comment custom object. These are both connected ...
1
vote
0answers
61 views

Record Name not created when creating visualforce page

I have a custom button on a child . This button allows the user to create a new child object in visualforce from the related list on the parent. However, the child's related list are not showing. I ...
0
votes
1answer
43 views

I want sync salesforce objects and my web application. How? [closed]

How to sync salesforce custom objects and my web application? I already tried that but I am fully confused with that. Please tell me how can I proceed ?
0
votes
1answer
91 views

Display Records Dynamically based on Date Filters

Using two date filters displayed in the VF page I would like to render the records in apex:pageblocktable. I am pretty new to Visualforce and this is what I have built so far. VF Page <apex:page ...
3
votes
0answers
42 views

Internal Server Error in Partner communities when using extension controller

We have a appexchange app in which there is a global class. We are using this global class as controller in local VF page and also created a extension class. When i try to use the variable declared ...
5
votes
2answers
121 views

Test Class SeeAllData=true Annotation

I am creating a test class that will test my controller class which uses almost 5 to 8 objects that has many DML statements like insert and delete, however I am feeling a little bit worried about not ...
0
votes
1answer
59 views

JavaScript executing before controller method finishes

So I have an action function which calls an apex controller method. I call this action function within some javascript at the top of my page and after that call I want to send some information to ...
1
vote
0answers
33 views

Unable to create an instance of extension {CLASS NAME}

I'm getting this error, i'm sure I what this means. I couldn't find anything helpful anywhere.
1
vote
1answer
36 views

Checking if object exists on controller

I'm trying to handle the edge case where a user hits my page without the Id being set for whatever reason. However, I'm having problems detecting when no object is loaded. I tried this: private ...
2
votes
1answer
223 views

How does one test Visualforce components with custom controllers

I have created a custom Visualforce component. It is backed by a custom controller. I am struggling to write unit tests for it. The limited VisualForce documentation indicates that to test it I ...
2
votes
1answer
48 views

Accessing Controller Property from VF page

I have a Controller property that displays the record type name of a Case. I just need to display the record type during Case Creation or Editing. This should be a read only as such I decided to use ...
1
vote
2answers
32 views

Expression cannot be assigned at line

How could I assign a value to a dynamic query field? I want to make an update of a record. ac.get(campo) = totalAcumulado.get((String)ac.Name); <-- Expression cannot be assigned at line This ...
5
votes
3answers
440 views

What controls the 'severity' of ApexPages.addMessages(exception)?

I'm trying to crystallize out some 'best practises' for Visualforce Page exception handling. I think, at a minimum, a page should look something like this: <apex:page ...
2
votes
1answer
53 views

What is the difference between initializing properties in shorthand vs constructor?

I thought these two samples would be functionally equivalent. But they behave differently: Initializing a property in the constructor: public with sharing class LeadController { public ...
2
votes
1answer
123 views

Uncheck checkbox using javascript after JS onload

I am pasting a complete code for anyone reference if they like to resolve it.(Just incase they want to know what i could be missing.) NOTE: CaseOwnerChanged__c = Checkbox field type <apex:page ...
1
vote
2answers
71 views

Accessing the fields of Database.query() results

Database.query(query) returns sobjects. I want to access each fields in this sobject to check the value on each field. How is this done in controller?
1
vote
1answer
47 views

Combine multiple PDF's together and attach them in a mail?

As of now , all i have is a VF page which renders as a PDF and it needs Account ID to be passed to generate a PDF . Is there a way wherein i can group all the PDF's into a single PDF ? Should i change ...
2
votes
2answers
80 views

Inline vf page to Related Section

Is there any way to put inline visual force page to related list section of case object?As per my understanding we can create new section above the related lists and we can put over there..but i ...
0
votes
2answers
245 views

passing data from Page controller to component Controller

I want to pass list of record from VF page controller to component controller but when i access variable in component controller using object creation then i am getting null value. I am taking Example ...
0
votes
0answers
62 views

Sorting Aggregate Results VF Page

working with VF Page page block table and attempting to display count of "sales" broken up by different carrier buckets. In my SOQL Query, I am able to easily get the rep's name and total number of ...
-1
votes
2answers
73 views

Test class for new case controller

I've recently been writing a few basic controllers for some visual force pages, and of course now need to test them. Problem is I don't really know how. Normally you know you'd instantiate the class, ...
5
votes
1answer
163 views

JavaScript Remoting and optimal Angular.js architecture

Background I am starting to build more and more apps with angular, inside of a Visualforce container. Since many of the database services rely on some apex logic, the services layer uses JavaScript ...
1
vote
1answer
260 views

Need to Filter a VF page with date input and pass to SOQL statement in controller

I have been working on this for a few weeks now so any assistance would be wonderful. I am trying to create a report with a VF page to pull information from some custom objects and their associated ...