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

0
votes
0answers
12 views

Total does not get displayed in a visual force page

Can any on help me out how to get the total display for the quarter in a visual force page which is in a PDF format .The Column count is not getting display for any quarters.Any help very much ...
1
vote
0answers
17 views

passing html passthrough from apex to selectoptions

I'm trying to pass through some additional information via the html- passthrough on apex:selectoptions from the controller. Ie I need it to output: <apex:selectOption html-data-range="h" ...
1
vote
0answers
21 views

Attachment Parentid population

I have two VF Pages. Say V1 , V2 where V1 is my parent page and V2 is included in it. Here in V1 an instance of a custom object (Call) is created and in DML insert it gets into the system. In V2 ...
0
votes
1answer
23 views

Updating custom lookup value from controller

I have been struggling with this problem for awhile and appreciate any help or suggestions to resolve this In my ORDERS I have added a custom field "ClassTeacher_c", this is a custom lookup field ...
0
votes
2answers
21 views

How to show error message on standard detail page from apex controller?

I have a button called Sync on Order object. I want to sync only those orderlineitems whose IsSynced field has value as 'No'. If there are no such orderlineitems then i want to display a message on ...
0
votes
1answer
27 views

Passing Parameter from JavaScirpt to controller don't seem to work

I'm trying to send a parameter from Visual force page to controller to delete the row of record on pagetable via javascript using actionFunction. I'm able to get the alert messages from javascript ...
0
votes
3answers
45 views

Controller extension variable visibility question

I don't know how to put this question, so I will just start with the code I have: MyController.cls global with sharing class MyController { public String variableOne{get;set;} public ...
0
votes
0answers
29 views

Apex Code Logic written to change the value in visualforce page doesnot work

Can any one help me on this? I have a Visualforce page created on Opportunity object which is in PDF format. I have a few RollUp summary fields created on opportunity object. There is a Wrapper class ...
1
vote
0answers
16 views

Relationship between page and controller

Is it advisable to have multiple pages for 1 controller? Like for each Visualforce Page, they only have minimal process just like initializations only. For example: I have Apex Class ...
0
votes
0answers
28 views

How to display a popup only when a record is created and not edited?

I am trying to show the user a popup only when the record is created. For every subsequent edit and save, the popup shouldn't be displayed. I have created 2 VF pages and 2 controllers so far and now ...
1
vote
3answers
33 views

Inserting a record with Lookup value

I'm trying to insert a custom object record which contains various custom fields and also a lookup field. Is it possible to insert the record without specifying the lookup field value? I've tried ...
1
vote
1answer
24 views

Error: Unknown constructor 'DuplicateQARelController.DuplicateQARelController()

Can anyone please help me figure out why I'm getting the error mentioned in the thread title? I'm trying to build a simple VF page with a custom controller. VF page: <apex:page ...
-1
votes
1answer
29 views

variable set by VF page is not accessible in another method in Controller

I am setting a variable from VF page by using Javascript Remoting Action and the same variable when I am trying to access from a different method in Controller it always says NULL. The below code ...
1
vote
0answers
14 views

Based on the product name ,split data with year and get the column count in visual force page pdf [duplicate]

Can any on help me out how to get the Data split based on the year , product name and get the column count in a visual force page which is in a PDF format . With Code i could retrive the data ...
-1
votes
1answer
66 views

column count in visual force page pdf

Can any on help me out how to get the column count in a visual force page which is in a PDF format . ProductName Q1 Q2 Q3 Q4 Total BXRC-25e4000-F-04 100 200 300 ...
0
votes
1answer
23 views

How can you associate multiple standard list controller with a visualforce page

Good afternoon, We have a visualforce page that allows us to add multiple contacts at once from a account view. When we add these I would like to be able to associate these contacts with a campaign ...
2
votes
1answer
26 views

Where Statement issue with SOQL, after upgrade

Not sure what happened but I had the following Custom Controller working just great until recently. Not sure if it was the recent release or if I just completely missed the fact that it wasn't ...
0
votes
1answer
42 views

Row count in a visual force page pdf

Can any on help me out how to get the Row count in a visual force page which is in a PDF format . ProductName Q1 Q2 Q3 Q4 Total BXRC-25e4000-F-04 100 200 300 ...
1
vote
1answer
18 views

Use “accesskey” attribute of apex:commandbutton in VF page

I am trying to implement a functionality that would allow users to invoke controller method by pressing "enter" key also. I know "accesskey" attribute of apex:commandbutton can be used to perform such ...
0
votes
1answer
18 views

Map<String, Object> from controller accessing the inner object

Having and data returned from api like this: { "result": true, "retData": { "CATEGORY_A": { "MEALS": { "price": "", ...
0
votes
0answers
12 views

What is an Ancestor Method?

I have a leadConvertController that is tied to several components and other controllers. One line keeps giving me a Method does not override an ancestor method. I don't even know where to start to fix ...
1
vote
3answers
25 views

Can we create visualforce page without any controller

Actaully I am new to salesforce . i want to create new visualforce page without any standard or controller in that page . this page should get only user name and user profile in single page. Could ...
-1
votes
0answers
8 views

URL is not getting changed in my visualforce pages

I have multiple multistep visualforce pages with a single unique controller. Whenever I click on command button on particular visualforce page suppose "mypage1", which redirects me to the another ...
0
votes
0answers
8 views

Update case field with timestamp when logCallPublisher is being used

I have a VF page setup to use logcall publisher that starts with - <apex:page standardController="Case"> <apex:logCallPublisher entityId="{!case.id}" I'm trying to update a case field ...
0
votes
1answer
37 views

Passing custom lookup field value to controller

I have a visualforce page which displays a list of orders in a table. For each order (a row in the table) there is a selectList for the user to select a teacher (i.e. this is a custom lookup field ...
2
votes
1answer
26 views

Passing apex var to controller

<apex:form > <apex:variable value="{!0.00}" var="total1"/> <script> document.getElementsByClassName('t1')[0].innerHTML = '{!total1}'; </script> ...
0
votes
2answers
25 views

Display Custom Setting from iterated value in Visualforce

I have a VF page & controller that is querying accounts and putting them into a list, and them displaying the fields Account Name, State,and Last Activity. I have a custom setting that is a list ...
0
votes
1answer
20 views

Trouble seeing debugs from Sites VF page controller

I'm trying to see debug statements generated by the custom page controller associated with a Visualforce page, but am having no luck. I see no logs to track. I'm looking for logs in the Dev ...
3
votes
1answer
63 views

How to instantiate a class in custom controller from within controller extension?

This should be simple. I have a custom controller like so public class MyClass { . . . public class MyType{ String a; Integer b; List<Account> c; } ...
0
votes
2answers
41 views

Prompt user in Javascript on user click

I have a pageblock table. Upon click the add button, it will trigger the add() method on my controller and return the boolean 'BO' value, I would like to check if boolean is true, there will be a ...
0
votes
1answer
36 views

Visualforce controller, save values from a list

How can I save list values in my controller to fields in my object? I keep getting the error "Initial term of field expression must be a concrete SObject: List". I can get the individual values in a ...
0
votes
0answers
62 views

Insufficient access rights on cross reference id on Entity Subscription

I have some code which creates an EntitySubscription so the owner of an Account auto-follows any case created. The case is created in a controller in Portal. The Community User has Read/Create/Edit on ...
-1
votes
1answer
33 views

Constructor Not Defined

I'm trying to write a unit test for a controller and I'm stuck at this error "Constructor not defined" Controller public Part__c getPartLookup() { if (partLookup == null) { partLookup = ...
0
votes
4answers
44 views

Not able to update using VF page in custom controller

I'm writing simple class, which has to insert or update few fields of account Getting following error : MISSING_ARGUMENT, Id not specified in an update call: Getting this error on this line ...
0
votes
1answer
298 views

Passing Inputtext field value in pageblock table to Apex controller

I'm trying to pass an inputtext field value within my pageblocktable to my Apex controller so that I can update the record. My VF: apex:pageBlock title="Z Table"> <apex:pageBlockTable ...
0
votes
1answer
38 views

Help writing test class

I am trying to write a test class for my custom controller, but am only getting 30% coverage. Controller: public with sharing class topRecordExt { public List<My_Lobby__c> getRecent2() ...
1
vote
0answers
25 views

Custom Component visible in Sandbox but not in Production

I created a few custom components to use in two different email templates (they all use the same controller class) and everything is working as it should at the Sandbox. But when I deployed it in ...
1
vote
1answer
113 views

Display default picklist value as Read-only on Custom Object

I am fairly new to Salesforce and recently came across an interesting problem for which I have been trying to find a solution. My app has a Custom Object called MyCustomObject__c with a VF named ...
1
vote
2answers
164 views

System.QueryException: List has more than 1 row for assignment to SObject

I am trying to write a VF page to list all the id and name columns from a custom object but found an error "List has more than 1 row" in the VF page. Can anyone tell me what have I done wrong? VF ...
1
vote
1answer
50 views

Empty values in a picklist

Root-cause: From the controller alone, it adds empty values but it can be removed with javascript though the javascript doesn't work. VF PAGE <apex:column rendered="{!allowDiscount}" ...
0
votes
1answer
23 views

Random Field Query

I have this on my controller. private String userName; userList = [SELECT Username, Question_1__c, Question_2__c, Question_3__c FROM User WHERE Username = :userName LIMIT 1]; What should I do to ...
0
votes
1answer
222 views

Issues passing value from javascript/jquery to controller using hidden input

below is my code: public with sharing class myController { public String passedInString { get; set; } public PageReference passedInValue() { system.debug('Passed in value: ...
1
vote
1answer
79 views

How to fetch data from salesforce custom object using SOQL

Below in eventDates method I tried to fetch the Event.eventDates__c but it didn't work. It isn't assigning the Event__c type to String[]. Anyhow I only need the dates from this field in the form of an ...
0
votes
1answer
83 views

How can I make a visualforce page readonly?

It could be the possible duplicate of this question. All I need to know how can I utilize this technique explained in the answer of this question?
0
votes
2answers
201 views

How to save custom object data in salesforce with Apex controller

Following is my custom object controller in Apex. I think it will work fine with the data coming from VF page. But what for the variable datesFromCalendar which contains the contents of JS array. How ...
0
votes
1answer
42 views

How to detect button action in controller that is associated with overriden Visualforce page?

I created a single Visualforce page that overrides default actions for almost all buttons for Event object. Actions are Edit, View, New Event, Accept and Decline. I need to detect the action in a ...
0
votes
1answer
38 views

Apex Class that checks a checkbox when contact is generated (match.random)

I have partly created an apex trigger that randomly selects a contact that is in a specific campaign. This works and I can cycle through the contacts at random. When i refresh the page however I am ...
0
votes
0answers
34 views

split method occuring once

I have below class snippet where split method is parsing data only once. It should be doing for all data. csvfilelines.size() shows 5 but records displayed from the sObjectList is only show one. ...
0
votes
0answers
26 views

Store record values before update

I have a requirement to allow User Rollback the Updates here by one click on a commandbutton. That feature I have tried to tackle by Revert Changes button here . Is there any other way to deal with ...
0
votes
1answer
114 views

Display error message from controller fails

I have below apex page where I am trying to catch a custom apexpages.addmessage from the controller. But it is not working , simply not displaying the error message in page. Can someone please help? ...