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
1answer
46 views

StandardController of Account to show a pageblocktable of related child object from an extension errors out

I have a object Competitor_Mapping__c that has lookup with Account. In the page, i have used standard controller of Account to fetch the current Account id from URL, used in a SOQL to populate a list ...
0
votes
1answer
10 views

Visualforce Event page Standard hour picker and duration fields

I want to add in my visualforce the hour picker and the duration standard fields This is the target: Now I have this in my visualforce page: There is a way to put the same fields maybe using ...
0
votes
1answer
7 views

Visualforce StandardController Event based on PageLayouts

There is a way to create a dynamic visualforce page and render the fields depends of the page layout?. Now I have 2 page layouts with different fields and I won't to create two visualforces. I'm ...
3
votes
1answer
33 views

StandardController delete() method problem

Does somebody know what can cause the problem that StandardController delete() method doesn't delete the custom object from the context. My extension for Standard Controller has such method: public ...
1
vote
2answers
40 views

How can i pass my object ID to my VF page using a custom button?

I have a custom object, Deal Registration, that can have a list of Products added to it. I create a junction object DealRegProducts. While on a Deal Registration, the user would scroll to the related ...
1
vote
1answer
18 views

“Data not available” when using Database.rollback() in custom save action

In my custom edit page for LineItem__c records I have overriden the save button with my own implementation which does not only save the record itself but also change to child records. <apex:page ...
1
vote
2answers
45 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
36 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
57 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
29 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
47 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
28 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
43 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
44 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
35 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
405 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
67 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
98 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
38 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
62 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
46 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
77 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
71 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
276 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
97 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
59 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
19 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
57 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
68 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
89 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
28 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
234 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
46 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
54 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
617 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
833 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
177 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
73 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
774 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
712 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
417 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
870 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
453 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
214 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
215 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
1k 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
730 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
433 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) ...