Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [standardcontroller]

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

2
votes
1answer
37 views

Get name of standard action overriden in Visualforce contorller

I have a visualforce page that overrides both the 'New' and 'Edit' Buttons of a custom object. In my controller extension how can I get the name of the action that called this page ? I don't see ...
0
votes
0answers
18 views

Sales Cloud: Related list and getting the right triggering object

I am using the Account standard object and the Opportunity standard object. I have a lookup relation from Account to Opportunity. A 'Related List' appears on Opportunity related tab. The code ...
0
votes
0answers
22 views

write a test class for a StandardController [duplicate]

My Controller: public class GeneratePDF { ApexPages.StandardController stdController; public Contact cnt {get;set;} public GeneratePDF(ApexPages.StandardController controller){ ...
1
vote
1answer
35 views

New custom field missing in standard controller?

This should be a simple change. I am modifying code from a previous developer so if there are any suggestions they are very welcome. This is a simple button to call a VF page that will produce a pdf ...
0
votes
1answer
23 views

Public VisualForce site - Create standard object

I have a visualforce page that I have linked to a public salesforce site. The page contains a form intended to allow the user to create a standard object (Campaign to be specific). My issue is that ...
1
vote
2answers
56 views

Get type of record from standard controller without accessing record?

I've got a component which is used on multiple object types in their visualforce pages. I have a controller which provides some data, and another to add some relevant fields. The controller which ...
0
votes
2answers
106 views

Visualforce page to create a new Opp Contact Role

Is it possible to create a custom Visualforce page for adding a new Opportunity Contact Role using standard controllers (Opportunity controller in this case)? The reason I'm asking is that I'd like to ...
2
votes
1answer
39 views

getParameters() returns null when passed a string that exists in the keySet()

I'm working with a standard controller on one of our organizations objects and have identified the parameter Id of a field we'd like to populate when a new record is being created. in the controller ...
0
votes
1answer
107 views

standard controller with extension

If we have standard controller with extension controller, extension runs in system mode generally. So now in this case extension controller, will it run in user mode? Provided i don't have with ...
0
votes
1answer
20 views

Based on Recordytype-selection i need to show or hide some values in standardcontroller and extension

When i change the record type value(technical or no technical) , i need to hide/show email__c, isClassTeacher__c and i need to show filtered picklist values based on record type selection for the ...
0
votes
1answer
21 views

How to show custom object fields in standard visual force page

i am trying to add one button in lead detail page layout.on clicking on this button i want show a visual force page showing custom object details.my custom object is tractor__c.so far i am trying this ...
2
votes
2answers
353 views

How can a developer display the Name from the parent Account record on the page?

While preparing myself to the Developer 1 certification I met the following question: A Visualforce page uses the Contact standard controller. How can a developer display the Name from the parent ...
-4
votes
1answer
27 views

Looking for a Test Class for code coverage [closed]

I have created an Apex Class and VF page for Popup Alert. I am looking for a test class for the same. Below is my Apex Class: public class PopUpAlert { public Contact cont; public PopUpAlert(...
0
votes
1answer
915 views

Standard controller and extension method with same name [duplicate]

Provided you have a Visualforce page that uses both a standard controller and an extension class. The extension class has a method with the same name as a method in the standard controller (i.e, ...
2
votes
2answers
382 views

Trigger a popup alert message using checkbox

I am trying to display a pop-up alert with a message on the uncheck of checkbox. I am using Standard controller and need to implement this functionality on the Contact Page Layout. I have a custom ...
1
vote
1answer
68 views

Unknown property error on Standard Controller when creating v-force page … but only for some users

I am getting the following error when creating a v-force page in a standard controller extension: System.VisualforceException: Unknown property 'Award__cStandardController.awardAmount' The ...
2
votes
1answer
102 views

Fetching related objects data from standardcontroller extension into visualforce page

public class TrackerExt { public String OpportunityId {get;set;} private final Opportunity opp; public List<Tracker__c> trackers{get; set;} public TrackerExt(ApexPages....
2
votes
1answer
67 views

Combine apex class for VF pages that use a standard controller and a controller?

I have a search box that will pull into all accounts we currently have. It will then direct to a custom record detail page that shows account's main information with the equipment they currently have( ...
-2
votes
1answer
183 views

Use Opportunity Standard Controller to populate Id on a lookup field on contact

I have created a Visualforce page to create multiple contacts from an opportunity and I am trying to populate the opportunity id as a lookup field on the created contact. I am using the the getRecord()...
0
votes
2answers
399 views

How to use StandardController from visualforce Component

I have a single VisualForce Page and multiple Components, and each components have different controllers for individual operations. But in one of the VisualForce Components I want to upload a document ...
0
votes
1answer
70 views

Error in Visualforce page with standard controller and continuation in extension controller

This is the error I get with the following controller and visual force page: Error: Unknown method 'Module_Test2__CM_Components__cStandardController.renderResponse()' Error is in expression '{!...
1
vote
0answers
102 views

Dsiplay 50k+ records in VF page with Pagination [duplicate]

I'm trying to build a page which shows a list of records in Salesforce database. There can be scenarios where there can be more than 30k or 50k or even more records. I'm currently implementing ...
0
votes
0answers
78 views

Issue with StandardController addFields() on WorkOrder sObject

I am overriding the 'New' button on the WorkOrder standard object with a Visualforce page. My users will be creating their WorkOrder records from the Case object. I want to get the CaseId using the ...
-6
votes
1answer
344 views

How to assign value for getter setter variable from Apex test class [closed]

Class A{ public object obj{get;set;} } Test Class Class A_Test{ //how to assign value fo obj variable }
-1
votes
1answer
81 views

Test Class Variable Error [duplicate]

I havent written any test classes before and I am having trouble getting started. Can someone help me put something together for this? I'm trying to insert a record with a certain field value (...
0
votes
1answer
655 views

How to display picklist values using HTML in visualforce page?

I need to display all the picklist values from the case object using the HTML syntax in visualforce page. <script type='text/javascript' src='https://c.la1-c1cs-frf.salesforceliveagent.com/content/...
0
votes
1answer
597 views

Input and save two custom object records in a vf page with standard controller

ChildObj__c has a Master-detail relationship with ParentObj__c. The need is to save ParentObj__c and ChildObj__c records in a visualforce which has ParentObj__c as standard controller. I'm trying to ...
1
vote
1answer
56 views

AppExchange ISV Security Review CRUD/FLS Puzzler

Who knows the answer to this puzzler? Q: If a Visualforce Page is using a standard controller with a custom controller extension and the controller extension is declared "with sharing", do we need ...
-1
votes
2answers
107 views

Assert on a standard controller

I am starting to learn writing testclasses but dont know how to assert on a standard controller see my code below public class accSearchController { public string searchStringContact {get;...
0
votes
1answer
96 views

reproduce apex:detail from id entered in inputfield

Normally with a standard controller you enter the ID in the URL to reproduce for example the apex:detail. Is this also possible by not entering the ID in the URL but trough and input-field?. What I ...
1
vote
1answer
314 views

Cannot use the getContentAsPDF function

BACKGROUND I have a VF page with one field on it: Page 1 <apex:page standardController="Opportunity" showHeader="false" sidebar="false" renderAs="pdf" > <apex:outputText value="{!...
0
votes
2answers
69 views

What is causing the null Pointer exception, and how to fix it

So i have written a controller extension, that fetches Opportunities. Everything worked as it should, life is great. But it displayed only 20 records... my way of fixxing that was adding the line ...
2
votes
0answers
104 views

Override Opportunity New button with Visual force not populating account name from Related List after record type selection in lightning

I have overridden the opportunity new button with Visual force page and working all well in classic. But we enabled lightning recently and Opportunity new button is working properly but. In ...
2
votes
1answer
439 views

Error: List controllers are not supported for AccountContactRelation

I want to create list button for related contacts related list, but if I try to give following standardcontroller = "AccountContactRelation" It gives me error Error: List controllers are not ...
0
votes
0answers
130 views

VF page w/ Account standard controller but all I can feed is Contact Id?

I'm trying to build a VF page using the Account standard controller, but the only Id I can pass into the page is a Contact Id. Is there any way to pick up that Id, grab the associated Account Id and ...
0
votes
1answer
116 views

how to make a column containing parent records an output link

<apex:page standardController="contact" recordSetVar="conList" sidebar="false" > <apex:form> <apex:pageBlock title="Contacts" > <apex:pageBlockButtons> <...
1
vote
1answer
31 views

Field updating in client but not server

I am trying to update quantity field in customer_product__c, but no luck - its updating in client level but not in server Code: /*method to update quantity in customer product */ public void ...
0
votes
2answers
464 views

Get data from apex standardcontroller into extension

I have a custom object standardcontroller and an extension. I have embedded a VF page on the custom object's pagelayout. When the new custom object is created, I want to be able to access the custom ...
1
vote
2answers
344 views

Passing InputText to Controller Extension [duplicate]

I have read through all the posts really but still not able to figure this out. I want to pass the no. of hours that are input on the VF Page back to the controller. Basically, user should be able to ...
2
votes
1answer
58 views

Extension Test: Constructor not defined: [<Extension-Name>].<Constructor>(ApexPages.StandardController)

I tried to write a Testclass for an Extension that is supposed to handle a replacement for a creation-page. TestClass: @isTest public class VisualforcePageExtTest{ static testMethod void ...
0
votes
1answer
358 views

A Visualforce logic for a custom button invocation

I have detail page and a custom button(Make Callout) which invokes a apex callout and does some validations. Below is the code of the VF page of the custom button: I have the tag so that I can show ...
0
votes
1answer
524 views

Unknown property 'ContactStandardController.Account'

I hava a visualforce page in which standardController is Contact. <apex:page standardController="Contact"> </apex:page> <script> var company = {!URLENCODE(Account.Name)};//...
1
vote
1answer
64 views

View updated child-relationship information

I got a page with standard controller and extension. <apex:page id="thePage" standardcontroller="Unit__c" extensions="Unit_Ext" .... Then I have blinded output field with a child relationship. &...
2
votes
1answer
419 views

Relationship using Visualforce and StandardController

Is there a way to get related records using something like {!Account.Contacts} in a VF page with Custom Objects? Does the type of relationship matter? If I have a custom object and it has a look up ...
1
vote
2answers
38 views

Exposing Vf Page on the Account Object

I am trying to create a simple VF page that creates a Physician's Note on save. I am having trouble exposing this VF page on the account object since the standard controller is set to ...
0
votes
1answer
694 views

VF page for inserting and viewing object values

I need to make VF page for inserting new Contacts that shows pageBlockTable of all existing Contacts below. After i add recordSetVar="contacts" save button stops working. <apex:page ...
1
vote
1answer
290 views

VF Page with standard controller rerender section

I am trying to create a VF page with standard controller where first I will choose a value from picklist between 1 to 10 and based on that fields form my object will be displayed. The problem is I ...
0
votes
2answers
4k views

How to display List values in VF Page

Apex Class: public class RelatedController { public Case selectedCase { get; set; } public List<VEH_Veh__c> selectedveh { get; set; } public RelatedController () { ...
1
vote
1answer
2k views

Need Related List of Notes and Attachments only but fetching full Contact Details

I would really appreciate if someone can help me over this. Requirement - I need a Notes and attachment of particular contact on VF page. I created a VF page in which I am calling related list of ...
1
vote
1answer
319 views

Problems overriding NEW-button for Contact in Standard Controller Action

I'm quite new in Salesforce and I'm having some difficulties. I'm creating a VF page in order to override the NEW button for CONTACT for certain profiles. I've already done it for the EDIT button and ...