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

-2
votes
1answer
38 views

Wrapper class IF Condition are not getting covered in a test class [on hold]

Can any one help me out why the Wrapper class IF Condition are not getting covered in a test class.Their are Rollup summary field and formula fields ,Checkbox as pick.How to call them in a wrapper ...
-3
votes
1answer
34 views

Rollup Summary Fields and Formula Fields are not writable but how to call them in test class

Can any one help me out with test class code coverage .I have written a test class for a controller having wrapper class and their are rollup summary and formula fields which are not writable but how ...
1
vote
1answer
30 views

Test class fails throws different types of error as :STANDARD_PRICE_NOT_DEFINED, No standard price defined for this product

Can any one help me out with test class code coverage .I have written a test class for a controller having wrapper class,but the code covearage is zero. Any help very much appreciated. Different ...
0
votes
0answers
19 views

Test class for a controller having wrapper class,code coverage appears Zero

Can any one help me out with test class code coverage .I have written a test class for a controller having wrapper class,but the code covearage in the test class appears Zero and the overall code ...
-1
votes
1answer
19 views

Proposal Type Controller Test Class [closed]

I'm new in creating test classes. Kindly help me on this one Thanks in advance. public class SelectProposalContr { public String selectType { get; set; } public String opptyId { get; set; } ...
8
votes
4answers
284 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* ...
1
vote
2answers
35 views

How to call a controller extension from java script

I'm creating a Visual Force page that enables user to add Case Comments. I am using javascript to create the comment and then I am using a controller extension to insert it. How can I call the method? ...
1
vote
1answer
29 views

Passing parameter from component to controller through ActionFunction

I would like to pass a parameter from my component to the controller. Here is the source code: <apex:actionFunction name="attachFil" action="{!attachFile}"> <apex:param ...
0
votes
0answers
8 views

Removing amp; on Metatag

I'm using Facebook share function on my website. However, I'm having issues with displaying my product image on FB. The URL link that FB scraper sees contains double amp;amp;. I would like to remove ...
0
votes
3answers
32 views

how to get value from drop down to the controller using apex SelectOption?

Controller Code - public class ApplicationController { public String selectedApplicationId {get;set;} public static List<SelectOption> applicationOptions { get { ...
0
votes
0answers
29 views

Trigger for a visual force page which has controller

Can I write an trigger for a visual force page which has controller? I have a Visualforce page created on Opportunity object which is in PDF format. I have a few RollUp summary fields created on ...
0
votes
0answers
18 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
21 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
23 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
27 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
47 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
29 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
49 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
34 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
18 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
35 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
31 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
15 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
70 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
25 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
46 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
31 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
19 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
31 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 ...
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
42 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
33 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
27 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
68 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
45 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
41 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
73 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
45 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
396 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
40 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
146 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
212 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
53 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}" ...