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

learn more… | top users | synonyms

0
votes
2answers
28 views

How to get field values from VF page

I'm stuck with a really easy task. My VF page have StandardController and Extension. I'm using the standard fields for Task object : <apex:InputField value="{!Task.Client_Name__c}"/> So I ...
0
votes
3answers
17 views

Value '[X]' cannot be converted from Text to core.apexpages.el.adapters.metadata.VFSObjectELAdapter

Faced with problem when saving the Task (Log a Call) record. This error shows up below field Subject on edit layout. My save Method is: Public PageReference saveRecord() { Task ts = new Task()...
0
votes
1answer
28 views

Trying to update related object fields from visualforce list

I have a visualforce page with a grid displaying an editable list of records from our Enrolment object. This list also includes a related field from the Contact, which is related to the Enrolment via ...
0
votes
1answer
21 views

(VF) How Do I pull a picklist from a related object as an input field onto a VF page that uses the Standard Controller with extensions?

Scenario: I've created a VF page that uses the Account standard controller with an extension that I created to pull contacts related to that account into a multi-selectable list using a wrapper ...
0
votes
2answers
24 views

Null object error trying to save records from VisualForce page

Opportunities set to best few or better require at least one related custom object record for objects Top 5 product Codes Created custom visual force page using opportunity standard controller and ...
0
votes
2answers
48 views

Pass value from the visualforce page to a global variable of a class

I tried to pass the input field variable value(as provided by the user) to a global variable in the controller. I have the following code. <div class="Modal"> <apex:pageBlockSectionItem ...
0
votes
3answers
36 views

Override Standard View Button and Inline Editing Disabled

I am having an issue where I need to override the standard New/Edit/View buttons on Cases with Visualforce pages.  These pages are just re-directs as I need to have 1 Case record type that is replaced ...
1
vote
2answers
46 views

Update user input value to a custom field

I have a below Visualforce page , where I am getting a user input using drop down selection. This input is for a custom field of an object which I need to update once I click save on the VF page. VF ...
1
vote
1answer
32 views

StandardSetController.getRecords() is returning unrelated records

In an VisualForce page I am using a standardController on the Quote object. I also have an extension that has a constructor that takes in a standardSetController. The standardSetController.getRecords()...
1
vote
3answers
40 views

Use controller extension attribute in Javascript

I am trying to get the id of contacts from accounts using Javascript.But seems like something is not right in the code, which has to alert the ids one by one. Here is my visualforce and extension code:...
1
vote
2answers
30 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
45 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 {!data....
0
votes
1answer
25 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 common.apex....
0
votes
1answer
45 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 Created',...
0
votes
1answer
25 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 createCase()...
-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
24 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
33 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 ...
2
votes
1answer
47 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
31 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
82 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
46 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
28 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
60 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
94 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
55 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
27 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
90 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
49 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" extensions="...
0
votes
1answer
19 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 List<abc&...
0
votes
1answer
42 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
62 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
33 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
57 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
74 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
34 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
39 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
22 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
104 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
207 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
42 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
35 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
71 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
132 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
27 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
77 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
40 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 ...