Tagged Questions

A StandardController is a built-in controller available for standard and custom objects to facilitate the easy creation of Visualforce pages.

learn more… | top users | synonyms

1
vote
2answers
33 views

Show values in VF page from both map and list

I have a requirement to show map values and list values simultaneously in a page. Can someone suggest a wayout? Apex controller: public class IncidentDetailExtnController{ Incident__c oInc ...
0
votes
1answer
15 views

How can I write a unit test which includes ApexPages.StandardController methods?

Currently looking at the Using Dynamic References with Custom Objects and Packages tutorial. For reasons I won't speculate on, step 7 included the controller extension code (again) instead of the ...
3
votes
1answer
52 views

How can I test create an instance of a VisualForce Controller Extension for testing?

Typical of custom controller extensions, my extension has a signature public MyVFCtrlExt (ApexPages.StandardController standardController) I'm currently trying to figure out how to write unit tests ...
2
votes
1answer
26 views

Allow my customers to edit their details via force site

I want to allow my customers to be able to sign into my force.com site (via authenticated website access) and allow users to view and edit certain fields related to them (i.e. email &phone details ...
0
votes
1answer
38 views

can we use single controller in two VF pages?

Here is a scenario where i have a search page for users to select and display the search results. I also have a button to generate the pdf. I have a list of account in the controller which displays ...
2
votes
1answer
19 views

Test custom controller that does not use parameters directly

Given a custom controller that uses a record selected by a standard controller (not through id parameter), how can I ensure that the appropriate Custom_Field__c field is available in the unit test? ...
0
votes
1answer
34 views

I want sync salesforce objects and my web application. How? [closed]

How to sync salesforce custom objects and my web application? I already tried that but I am fully confused with that. Please tell me how can I proceed ?
2
votes
2answers
39 views

Populating standard name field with a case number

I am trying to populate the standard name field of an object with the case number. I have tried to use an apex class to accomplish this. Here is the code I used: GW_Volunteers__Volunteer_Job__c ...
1
vote
1answer
29 views

Checking if object exists on controller

I'm trying to handle the edge case where a user hits my page without the Id being set for whatever reason. However, I'm having problems detecting when no object is loaded. I tried this: private ...
1
vote
1answer
167 views

How to display a Related List in a Visualforce page

Can any one help me out ?I'm Creating an OpportunityLineItem(Opportunity Product) page in Visualforce page and now how should i call the related list(Schedule) fields to get display in Visual Force ...
0
votes
2answers
57 views

how to get a 3 Tables side by side in a Table using HTML

I have three different tables with part number ,Pricing Request and Quantity.All these table should be created in a table with different tables.I have used html table but it comes on below the other ...
0
votes
4answers
57 views

How to call the parent fields in a child object in visual force pages

Can any one help me out.Any help is very much appreciated. I have a custom object name as "RFC__c" and it has a lookup relationship with opportunity object.Now i would like to get the opportunity ...
0
votes
0answers
36 views

How do I “cast” concrete types in Visualforce?

Apex StandardSetControllers are powerful. I love the ability to new one up and dump it on a page. Here's a contrived example, where a Contact has many Engagements with ratings etc: public with ...
1
vote
2answers
50 views

ERROR on VF PAGE :it should only display the Account Name

Can any one help me out with this Error on Vf page.Any help is very much appreciated. When i test in my Sandbox ,it just display the a/c name .Similarly when i check in Production for one of the ...
1
vote
2answers
39 views

custom extension has without sharing annotation but still runs in user mode

I have created a custom controller that extends a standard controller. My custom extension is defined 'without sharing'. Nevertheless, it seems to execute 'with sharing'. I get the feeling that an ...
0
votes
0answers
59 views

When we click on Button it Should generate a PDF FORM with the Ship to and Ship from details

Can anyone help me out with this requirement ?Any help is much appreciated. We do have two Buttons as GeneratePicklist and GenerateInvoice created using Execute Javascript ,ON a detail page button. ...
2
votes
2answers
54 views

Newbie VF Question: Save action not saving record

I have the following basic VF page to update fields of an Asset object from a Case page: <apex:page standardController="Case" > <apex:form > <apex:pageBlock title="Update Asset ...
1
vote
2answers
196 views

Error in VisualForce Page as :List index out of bounds: 0

Can any one help me out with this Error ??Any help is much appreciated Error in VisualForce Page as :List index out of bounds: 0 Here is my VF Page and the Class. Visual Force Page : ...
6
votes
1answer
79 views

Standard Controller behavior with not available ids - behavior changed?

Question Do standard controllers no longer throw exceptions if the current user doesn't have access to the passed in id? Has this always been that case or did this just recently change? Hoping to ...
-1
votes
1answer
54 views

multiple Standardcontroller

I have to use VF page of a custom object in Account page layouts.Please find my apex class as below. Apex class: global with sharing class poistionController { public HCP_Depth_Tracker_OAPI__c ...
0
votes
0answers
18 views

why do we need extension for controllers [duplicate]

I am new to SalesForce , I just learn about Standard controllers ,Controllers and Extension to these controllers. But what I do not get is why we need extension to the controllers ? By that I meant, ...
1
vote
1answer
47 views

Share (wizard-like) state between page with controller extension and page with controller

I have a custom VF page to create new or edit records of Type CustomObject__c. Via a Linker__c object such records can be related to other OtherCustomObject__c. To create such links I have a button ...
0
votes
0answers
62 views

can we update the related list object data with standard controller as master object?

I have two objects quote and quotelineitem master is quote and related to quote line item quote---->quote line item Visualforce page : I have kept like this <apex:page ...
1
vote
1answer
82 views

Saving Account Information in a Lead Visualforce Page

I have created a visualforce page for our Lead Details page that displays Account information along with Lead information. I want to be able to save whatever changes our reps may make to the Account ...
4
votes
2answers
1k views

SObject row was retrieved via SOQL without querying the requested field in controller extension

I have written this controller extension: public with sharing class PopupController { ApexPages.Standardcontroller cont; public Request_Change_Reseller__c req{get;set;} public ...
2
votes
1answer
27 views

Can I send a user to an edit page which, when they press Save, will send them to the detail page?

Related: Can I send a user to a standard layout edit page at the end of a wizard? I have implemented a wizard that sends the user to the standard edit page at the end of the wizard. It's working ...
0
votes
2answers
206 views

Retrieve Data from Custom Object in Datatable for a specific Account Id

I am trying to reference a custom object that has a related list on our account page called "SVMXC__Service_Contract__c" and has a child relationship name to accounts of: R00N70000001hzYIEAY. I need ...
0
votes
0answers
45 views

Unable to fetch record from StandardController - OnChange of Inputfield

I have VF page where there is lookup field e.g. XYZ. After selcting a record from XYZ, I want to automatically render ABC record related to XYZ, where ABC is an Inputfield. I have written method ...
0
votes
3answers
50 views

Unable to fetch Record from Standard Controller

Here is snippet of constructor : I have VF page where there is lookup field, onchange of that lookup field I have to render some other fields from another Object using SOQL ---- I have called the ...
3
votes
1answer
515 views

Visualforce pageblocktable view of opportunities in account view - how to control the order?

I have created a table of 'sales data' in visualforce for display on accounts page, by creating custom fields within opportunities, and have created each 'opportunity' as a 'year' of sales data. the # ...
2
votes
2answers
716 views

Inserting a parent and multiple child with the same visualforce page

I have a master detail relation ship between two objects where NdF__c is the parent, and the child is LineExpense__c. I want to insert many LineExpense__c relating to one NdF__c, so I add dynamically ...
2
votes
0answers
160 views

apex:actionFunction action doesn't seem to work the same as apex:commandButton action

I am trying to override a custom object new and edit actions with a simple visualforce page. The desire is to not need a custom controller and just use the standard controller methods. <apex:page ...
3
votes
1answer
69 views

Accessing parent by a standard controller

I have page which uses contact standard controller which is as below <apex:page standardController="contact"> {!contact.account.name} </apex:page> When I pass a valid id for contact ...
2
votes
2answers
677 views

Iterating over related records in visualforce using standard controller

I'm diving into visualforce and the standard controller for the first time and having trouble iterating over a single opportunity's related records. The below code produces an error: <apex:page ...
5
votes
2answers
603 views

Required fields do not allow cancel

I have a custom VF page that I am using as a custom cases page, standardController="case". I have an apex:form with a few apex:inputField to create the boxes. Inside the form I have a save and cancel ...
0
votes
2answers
348 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
773 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
2answers
416 views

Get the Id of an object in the standard controller without an extension?

Is it possible to get the Id of an object in a Visualforce page without a controller extension?
4
votes
1answer
1k 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 ...
1
vote
1answer
207 views

Extend standard page with a picklist that contains data from an external system

The requirement is to extend the Campaign page with a custom picklist field that shows data (select options) stored in a 3rd party system (accessible trough a rest endpoint). I know there is the ...
0
votes
3answers
204 views

Mass Edit Sortable VF Page

We are trying to implement a mass edit type VF page that displays a few fields in a list and allows the user to edit one of those fields. We have a requirement that the list be sortable by column. ...
2
votes
2answers
971 views

Unknown constructor 'Name.Name(ApexPages.StandardSetController controller)' when removing RecordSetVar

I am attempting to convert my page to work from List View button into Detail Page button. When I attempt to remove the recordsetvar, I get the mentioned error. Unknown constructor ...
0
votes
1answer
681 views

Displaying Person Account's “Last Name” , “Salutation” and “First Name” fields on a Visualforce Page

In my org i have enabled Person Account, and i have a visualforce page where i need to get Salutation,FirstName and LastName field from person account, But when i call it using <apex:inputField ...
1
vote
1answer
400 views

Override standard page with VF page and save which has dynamic picklist in it

I have VF page to override standard contact "new" button page, In that VF page i have Project field which will get the picklist value(project name) dynamically when i insert one project(custom object) ...
5
votes
1answer
442 views

which standard controller should be used to override Person account “New” and “Edit” Page using VF Page?

I am overriding person account standard Page with VF page. If I use standard controller as "Account" I am unable to get Picklist field values from "Person Account", If I use "Contact" as a Standard ...
1
vote
2answers
333 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 ...
1
vote
0answers
36 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
3k 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
1answer
355 views

Query regarding trigger?

I am having following requirement: To get list of all the users for whom profile has been changed. Then query on FRUP (It is a custom object) to retrieve all the records which are associated with ...
3
votes
1answer
105 views

What controller to use for a visualforce tab?

I have a VisualForce page that uses an Apex class to provide extensions, and this is what I have when I put that page on the Contact page: <apex:page standardController="Contact" ...