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

learn more… | top users | synonyms

2
votes
1answer
23 views

Saving a new record in VF - using extension to add fields user cannot add

I have been working on this for a day too long and I do not know why I'm not getting it. It should be the simplest thing.. A user can review a thing. All I want them to do is make a rating 1-5 and ...
5
votes
1answer
112 views

How to override Save method in standard controller extension?

I am wriiting a extension on Case object. There I want to write a save method with my own logic and want this save method should override the standard Save method. So my code goes like below: ...
3
votes
1answer
50 views

Uncaught ReferenceError: initViewstateTab is not defined. Debugging Visualforce Page/Controller

I'm attempting to build a visualforce page with the following functionality: Dynamically generate 3 picklists, based on children of a given object's values. Based on the values of the picklist, pull ...
2
votes
3answers
87 views

How to bind visualforce page values to Apex controller code for use in business logic

I have been trying to do something that I thought was easy, but it is making me crazy. I can get values from the apex code to be shown on a Visualforce page, that is ok, {get; set;} will do it. Now, ...
0
votes
2answers
29 views

what's better, custom controller or extension

I need to create a visualforce page that automatically creates a case and an event about the case creation. Once a user lands on that page, which has one parameter identifying the account, if the ...
1
vote
1answer
34 views

Controller Extension Test - action method in actionSupport not invoked automatically?

Assuming I have two picklists in my VF page, something like this: <apex:selectList value="{!parentId}" id="cmbParent" size="1" required="true" label="Parent"> <apex:selectOptions ...
1
vote
1answer
93 views

Best approach to cloning records with rollback

I have the below code which works well to clone a case record. In this scenario, we want to insert a new case and save it. But I have a new request to create sort of a quick case where we would only ...
4
votes
1answer
119 views

Can you access parent object fields in a 'New' page override without using SOQL?

I have two objects, Parent__c and Child__c, Child__c has a lookup field to Parent__c calledParentId__c. I have overridden the New and Edit pages for Child__c using a Visualforce page with the ...
3
votes
1answer
26 views

Can't create apex page which uses controller extension via apex-mdapi

I have a class in my managed package: global class myExtensionClass - which is extenison controller. I installed this package in test salesforce developer account. When user click one of the button ...
1
vote
1answer
16 views

Controller extension on an archived task

So I have a VF page that is being used to override the Task View and Edit actions. <apex:page standardController="Task" docType="html-5.0" readOnly="true" extensions="myControllerExt"> ...
-1
votes
2answers
69 views

Need help with extension test class

I need some major help writing a test class for my extension. I've work half the day with no luck. There's no use in posting what I've got as it isn't working. This is my first extension class. Any ...
1
vote
1answer
46 views

How to limit Visualforce lookup field to only lookup and show Users instead of other objects?

So I have a VF page looking into a custom setting field - SetupOwner. The issue I'm having is I want to display only users and have end user only edit/add users to the custom settings as opposed to ...
2
votes
2answers
67 views

Displaying Errors Through actionFunction

I have an APEX Page with a controller extension that collects a few fields of information from a user and creates a lead with a task when they click on the "Create Lead" button. I have purposely made ...
3
votes
1answer
32 views

How can I submit a Detail-tag based page?

I have a very simple VF page that displays the Detail-tag Opportunity page. Within it, I have a Custom Button that calls the finish() JS method. From there, I would like to submit the Opportunity ...
0
votes
1answer
22 views

can any body figure this error?

In case data is not there it has to empty CEO .in case the data is there it has to show that data Controller: public with sharing class silogletter { public Contact contact {get;set;} public ...
0
votes
1answer
210 views

System.NullPointerException: Attempt to de-reference a null object

Can anyone help with this error? System.NullPointerException: Attempt to de-reference a null object Class.productdata.getMapOfContent: line 24, column 1 Here is the Apex Class. "Line 24" ...
2
votes
1answer
401 views

Update Record values on Visualforce Extension by actionSupport

Background I have a VF page that use StandardController="Opportunity" and also extensions="OpportunityControllerExt". I'm showing the opp.stageName and the opp.Probability. When the StageName ...
3
votes
2answers
102 views

How to test New behavior of a custom controller extension

I have a Parent__c and Child__c object with Child records using a custom Controller Extension and Visualforce page for EDIT and NEW. Testing this controller extension for existing Child__c records is ...
1
vote
2answers
121 views

Modify visualforce input before saving and before reaccessing

Here's the scenario. (a) In standard controller extension for Custom_Object__c, we define custObj as public Custom_Object__c custObj{get;set;} (b) In visualforce we have an input field ...
5
votes
1answer
312 views

Unable to access controller class properties from extension class

I am creating a new opportunity wizard to ensure that specific data is always entered when our sales reps create a new opportunity. As part of this effort, I've also over-written the lookup window for ...
1
vote
0answers
22 views

How can we associate this process to one record? (Record Id in Controller, Prepopulate Field A and prompt user input for Field B.)

Really looking for some help/insights here..Any guidance would be greatly appreciated!! Here's my scenario: A record id can be obtained in the controller using ...
0
votes
1answer
668 views

Creating New record using Standard Controller and Extension

I have created a page using standard controller and extension. This page should create a record if no id passed and shuold update a record when id passed. Following is the controller public ...
1
vote
0answers
54 views

How can I make it so that everytime constructor is going to get called?

I have a page A contains another page B by apex:include. however when every I tried to refresh the page using rerender the constructor won't get called. page b has a standard controller and extensions ...
2
votes
2answers
364 views

How to pass page message to arbitrary Page Reference [duplicate]

Is it possible to pass a page message to a newly created PageReference, so that this page will display it? public PageReference doAction() { PageReference resultPage = new PageReference('/'+id); ...
3
votes
2answers
215 views

Editing a Account picklist field on an Opportunity page layout using VF page

I need to create a VF page that I can insert on my Opportunity Detail page layout that will contain custom fields for the Account object. This will allow our sales reps to edit/update these fields ...
3
votes
1answer
634 views

How to call methods from multiple extensions in visual force page

i have created visualforce page with multiple extension. For ex: for controller one(cntrl1) i have created method(methd1) and for controller two (cntrlr2) i have created same method(methd1). Now on ...
2
votes
1answer
602 views

Error: Unknown property 'OpportunityStandardController.opp'

I have a controller extension and I get the unknown property error on page load. public with sharing class ExtensionController{ public ApexPages.StandardController standardCon; ...
2
votes
2answers
306 views

apex detail page is blank

I am trying to display detail of a custom object by using apex:detail. But i am getting no a blank page without any details i try it with Account but it was not working. <apex:page ...
0
votes
0answers
38 views

How do I extend a standard Account Controller with a PageReference Class with a POST method for SSO credential passing?

I have the VF page and original class I will use to model the controller extension after. How do I extend the Account standard controller with a PageReference class with SSO parameters?
2
votes
1answer
696 views

Creating Salesforce Person Accounts via Visualforce

I have recently activated and configured Person Accounts in our salesforce org. We will be using these within the service console and also integrating Postcode Anywhere for address lookups. To ...
0
votes
2answers
890 views

Populate address field upon Contact lookup selection

I have about 2 weeks experience in Visualforce and Apex and I am having trouble with displaying an address field related to a contact object. I have a custom Order object called WIMS_Order_c. With a ...
0
votes
1answer
159 views

What do these lines on a controller extension mean?

I'm trying to build a test class for a controller extension on a Visualforce page and I need a more in depth description of what certain lines mean. Help on this would be appreciated. 1) String ...
6
votes
1answer
1k views

Multiple controller extensions communication

I have a Visualforce page with two controller extensions. Is there any way to get a reference to one of the extensions in the other one?
3
votes
1answer
132 views

Easy way to find out which field has changed in custom save() in Controller Extension

For some reasons I had to implement a ControllerExtension with a custom save methods which delegates the actual DML to a batch. I only want to fire this batch if any (or specific) fields have been ...
1
vote
0answers
168 views

Issue with overrided Cancel button not update related fields

I am implementing a visualforce page with a customized 'cancel' button and 'cancel' function in the controller extension Here is the sample code <apex:form> <apex:pageblock> ...
2
votes
1answer
235 views

Does a VisualForce page embedded in a page layout have to finish executing before the page will load?

Thanks for reading my question. I am looking to create a trigger on the OpportunityContactRole which is unfortunately not supported (I'm curious as to why, if anybody has insight on that, but that is ...
4
votes
1answer
138 views

Can there be a Shared Extension across Multiple Overridden Visualforce Pages?

I would like to know if its possible to share a common extension class across multiple Visualforce Pages which use different standard Controllers. For Eg., I've VF_A Page which overrides default ...
10
votes
2answers
499 views

Do I have to prevent Dirty Updates myself when overriding Save in a controller extension?

The standard behavior (tested on Opportunities) is that Salesforce seems to handle dirty updates / save conflicts as expected: User A opens Opportunity X User B opens Opportunity X User A modifies ...
11
votes
3answers
877 views

Knowing if a future call is allowed

I'm having an issue where we have some code that can be called anywhere and then it makes an @future call to log a message to an external system. The problem is if this method is called (either ...
3
votes
1answer
706 views

VF Pages as Tabs with in a Main VF Page (Including Multiple VF Pages)

I am looking at a robust & scalable approach to include multiple (~10) VF Pages as Tabs into the Main VF Page. Each of these will have its own controllers (heterogeneous controllers overall). What ...
1
vote
1answer
186 views

Is it possible to for a controller extension and visualforce to override BOTH New and Edit buttons?

I currently have a controller extension + visualforce overriding the New button on an object. I'd like to to see if it's possible to reuse this for the Edit button as well. If so, are there any ...
2
votes
1answer
1k views

How to get the object reference from a standard controller save()?

See the following VF Page controller extension: public with sharing class IssueController { public Issue__c obj {get;set;} private ApexPages.StandardController stdController; public ...
5
votes
3answers
290 views

Controller extension design pattern help needed

Objective I'm trying to create a series of inline charts to be displayed on the detail of a record using either Visualforce Charting or Highcharts. The charts do need to be dynamically rerendered ...
3
votes
1answer
192 views

Render a tab for certain public groups

I have a custom page that overrides the default account page, dividing it into multiple tabs. I was wondering if there was a way to use the "rendered="{!IF($.........." to make the tab available to ...
2
votes
1answer
2k views

Passing parameters to Extension Controller for test

I have a Extension Controller which gets back a different set of Opportunities based on the value of HTTP parameter named display sent in. So my code is as such: public ...