A controller extension is an Apex class that extends the functionality of a standard or custom controller.

learn more… | top users | synonyms

1
vote
2answers
25 views

Content cannot be displayed: Attempt to de-reference a null object. Controller and Visualforce Issue

This basic controller below should work. I get the Content cannot be displayed: Attempt to de-reference a null object. Controller and Visualforce Issue error on the Visualforce page. Looks like my ...
0
votes
2answers
44 views

How to Reference Variables in a Controller for a Visualforce Page

I wrote a large class within my Controller and I cannot figure out how to allow the variables contained within the controller to be referenced on a Visualforce page. Why can I not just use ...
0
votes
1answer
24 views

How can I customize the ExceptionMessage thrown by Apex Class?

I am getting the following message on my VF page. common.apex.runtime.impl.ExecutionException: Unable to Parse Date Value I wish to suppress the first part of the message which is ...
0
votes
1answer
42 views

testing a radio button selection functionality

I am testing an updatecase method in my class which look like this: public PageReference createCase() { Case c = new Case(Status = 'New', Origin = 'Phone', Subject = 'This is a New Case ...
0
votes
1answer
23 views

Test pagereference redirection to detail page

I am writing a test for a method in CreateNewCase class. This method in CreateNewCase class creates a new case and redirects the page to the new case's detail page.: public PageReference ...
-1
votes
1answer
28 views

Test class for a pagereference method

I am trying to test a logic in my extension. I have three boolean variable(I am setting them as false in constructor). In my method displayButton() , if all three boolean value are true then I set a ...
-1
votes
1answer
23 views

Testing the Extension for a Visualforce page

I am just curious about the following code, not able to achieve 100 % code coverage. Following is the extension and its test class. public class RW_EnquiryFormExtension { public String projects { ...
2
votes
0answers
29 views

get data from another class to vf page [closed]

I have a class which is using object of another class and I want to use it in my vf page .`This is my Vf page and I want to access my CalculatorView class data in my vf page. `` public with sharing ...
1
vote
1answer
38 views

How to Override (Related List) New Button?

I am attempting to override the "new" button that I see on the Opportunity List page with a Visual Force page. I intend to use the same page and same controller for the New and Edit buttons. The Edit ...
2
votes
0answers
27 views

Dependent class is invalid and needs to be recompiled

I have written a controller extension and am having difficulty deploying it to production. The extension allows a flow embedded in VF to finish on a Case record created during the flow. The error I ...
1
vote
1answer
64 views

Include radio button for each row in PageblockTable

I am having a hard time to figure out how I can include the radio button select option within the PageBlockTable. I am searching all the cases related to a contact here. Logic in my controller ...
1
vote
1answer
35 views

Sobject list as radio button Select Option

I am building a page where I have contact's first name and Last Name as an input field. When I enter the first and last name, and click search all the cases related to the contact should display as a ...
1
vote
1answer
23 views

Lookup field value in controller extension

I am creating a page where I am able to create a new case related the contact. In my controller extension in createCase() method, I am unable to populate the contact field( Lookup object on case). ...
0
votes
3answers
34 views

Controller Error: expecting right curly bracket, found 'for' at line 12 column 8

I am gathering some data for a bar chart. I cannot see why it keeps yelling at me for the right curly bracket. Error: Compile Error: expecting right curly bracket, found 'for' at line 12 column 8 ...
6
votes
1answer
91 views

Queues, Email Notifications, Standard Controller Extensions. Oh My!

Created a controller extension for the standard case controler. we set the OwnerId using custom save logic, but it doesn't seem to matter what i do, Queue Notifications are never sent out to members. ...
4
votes
2answers
54 views

controller extension not found

I created a controller extension for the Contact object. I don't know if it will work or not, because I can not test it. Salesforce is acting like my controller extension does not exist. Error: ...
1
vote
1answer
26 views

Controller Extension Get;Set; and Get();

I do not understand how the get;set; and get(); flow together. I am trying to gather values from a url. I keep getting the Compile Error: Unexpected Token: '='. Furthermore, how would I even test the ...
3
votes
2answers
88 views

SelectOption Method only working before clicking commandButton (quiscksave)

Newb Alert With a basic Extension, I populate a field with a SOQL. The desired behavior is when the lookup field is populated by a user, the second field shows a picklist with only the relevant ...
0
votes
1answer
43 views

How to save fields from visual force page with extension as controller

I am trying to save value user select on picklist field to Opportunity object field. my visual force page is as follows. <apex:page id="thePage" standardController="Opportunity" ...
0
votes
1answer
17 views

Accessing a List of object__C in Visualforce page

I have a below class: class abc{ public object__c var1; public string var2; } Assume that in my controller extension I have created a list of class abc: List<abc> somelist=new ...
0
votes
1answer
40 views

Display elements of List in Visual force page

I have a skill_Review__c object which has two lookup fields in them - Skills__c and Level__c. Below is my VF and controller. I am trying to get the user input on level field by clicking the edit ...
2
votes
2answers
57 views

User input to update a object in a record

My data model: I have a object called skill review which has skill__c,level__c as a lookup fields. I have a interview object which has skill review in a related list. I have a visualforce page where ...
1
vote
1answer
29 views

Comparing the duplicate value in VF page

I have a the below portion in my VF page: <apex:pageBlockTable value="{! SkillReview }" var="ct" > <apex:column value="{! ct.Skill__c}"/> And in my controller I have: public ...
0
votes
0answers
23 views

Using a single button for Save and edit functionality [duplicate]

In my VF page I show both save and edit button. I would like to use only one button for both edit and save. The button label should switch between save and edit depending upon the situation. That ...
0
votes
0answers
42 views

Data disappear when page is refreshed

I have a VF page where I have a input text and output text. I have the VF page in a page layout of an object called interview. I also have a separate edit/save button on the VF page. When I use edit ...
0
votes
2answers
65 views

Access a variable in VF page from Controller without using get set method

I have a visual force page as below: <apex:page standardController="Interview__c" extensions="SkillReviewExtension"> <apex:form > <apex:pageBlock title="Candidate Skill ...
0
votes
2answers
24 views

Controller Extension Test Class - Method is not visible

Need some help with updating a controller extension test class. I am getting a "method is not visible: test_session_and_session_benefit.testCreateSessions()" error. This test class is being ...
2
votes
1answer
32 views

Get parent parameter on child's new button override [closed]

I have two objects, Parent and Child. The Parent object has a Url field. I am trying to override the child's Create New button and I need to be able to tap into the parent's Url attribute on the New ...
-1
votes
2answers
32 views

Controller extn test class is failing with error : this ID value isn't valid for the user [closed]

When i run the test class for the below controller extn it is failing with the error System.DmlException: Insert failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, Record ...
2
votes
1answer
21 views

Bypass entry when object not desired on Wizard

I have a case entry wizard, duped and revised from the Visualforce in Practice workbook. My second page asks the users if they want to add Case Team Members. If they put a user in the name box, they ...
1
vote
2answers
89 views

How do I check CRUD and FLS in apex?

Please help me solving this Issue. I'm new to the salesforce, I worte an Controller which do get list of objects values from contact, Cases and also inserts New cases and Case comments to, During the ...
1
vote
2answers
121 views

Re-rendering section on picklist value change - picklist value is always null

On a Visualforce page, I have a picklist (apex:selectOption). When a user selects certain values, additional input fields have to appear. Otherwise, they should be hidden. There are a couple of ...
1
vote
1answer
38 views

The installed managed class zqu.ProductSelectorController is not visible

I am getting this error trying to use a custom visual force page in place of a managed package visual force page. I made my custom controller global, thinking that it was mine that needed to be ...
0
votes
2answers
33 views

Pass Record ID from Account to Visualforce Page without Saving Visualforce Page

I want to pass the Record ID to a visualforce page and reference that ID on an outputLink URL to take them back to the account. The User cannot "Save" the visualforce page, so how can I keep the ID? ...
0
votes
1answer
60 views

SObject row was retrieved via SOQL without querying the requested field: Opportunity.OwnerId

I have the following code: public with sharing class ExportCheckPageController { public boolean checkYes { get{if(checkYes == null) checkYes = false; return checkYes;} set;} ...
2
votes
2answers
122 views

Unknown Property on Controller Extension

So I have a standard controller and an extension that I'm trying to use to call back a list from a different object to use in a PageBlockTable. In the visualforce page I declare my standard ...
0
votes
0answers
24 views

Insert failed. attachmentimg: Class.AttachmentImgController.saveImg: line 26, column 1

Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Parent]: [Parent] Error is in expression '{!saveImg}' in component in page ...
0
votes
1answer
72 views

How can i get case ID in VF page from a custom object? [closed]

I have created a custom object work_order__c in this custom object i have created a case field as a master-detail to work_order__c. How can i get the case id in VF page for saving the workorder? I am ...
0
votes
1answer
31 views

Controller Extension Error

I have a VF page on a custom object and I am trying to create a button that will essentially mark a checkbox field as TRUE and save the record. I created a controller extension and I have a Repeat ...
3
votes
1answer
34 views

User Role with IF Statement

I am trying to populate a field in a Visualforce page for custom object using a controller extension. I would like to populate the field with one value if the User Role of the person creating the ...
0
votes
2answers
37 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 ...
1
vote
1answer
27 views

How to create contact detail page using controller? [duplicate]

How to create contact detail page using controller? <apex:page standardController="Contact" extensions="ContactDetailController"> <apex:form > <apex:pageBlock mode="maindetail" ...
0
votes
1answer
59 views

how to create contact detail page using controller [closed]

public with sharing class ContactDetailController { private ApexPages.StandardController standardController; public string conId{get;set;} public ...
0
votes
1answer
27 views

List of existing records in custom object

I am trying to list the existing records for the current user in my VF Page: here is the start of my page with the controller and extension defined: <apex:page id="ChangeRequestList" ...
0
votes
1answer
34 views

VF Controller Test not picking up Field on Parent Object

I have a VF Page for a Custom Object that asks a User for a PIN and checks it versus a field on the Contact Object which is it's direct Parent. This Controller Extension is used for 2 other VF Pages, ...
0
votes
1answer
47 views

Lookup manager Name from User object in VF Page

I am building a VF page for my custom object Change Request. In my object trigger on Save, I populate the Manager field of the record with this code: if (trigger.isBefore && ...
3
votes
2answers
94 views

How to Write Test Class for Standard Controller Along With Extensions

Hi Everyone I'm finding it difficult to write test class for this class Class public class SendEmailReceipt{ public Payment_Receipts__c Rec; public string em{get;set;} public id ...
-2
votes
1answer
70 views

Ending position out of bounds: 18

I have a Custom Edit button. When clicking the Edit it is showing the error as "Ending position out of bounds: 18" Below is the code for class.Thanks public with sharing class ...
0
votes
1answer
46 views

How to access User's Profile fields in visualforce page Javascript portion

I want to access a custom field of my administrator profile in a Visualforce page which has a standard controller i.e. "Company__c". I want to access the custom field in javascript portion of that ...
3
votes
3answers
101 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 ...