A controller is one piece in the Model-View-Controller (MVC) architecture of Visualforce. A controller can be a standard or custom controller and extensions to controllers can written.

learn more… | top users | synonyms

0
votes
3answers
37 views

How to call the Boolean variable from apex class to vf page

Could you please help me on getting the value of the boolean variable from apex controller method to VF Page. First i will tell my requirement, If the user unable to update the record "eruObj" he ...
-1
votes
1answer
16 views

not copying mailing address(contact) into billing address(Account)

this is class public class CopyAddressTriggerController { public static void perform(set<id> ids){ List<Contact> con = new List<contact>([SELECT Id,name ...
0
votes
1answer
10 views

lastupdated contact address store in asscociated account address using trigger

Showing ERROR : but showing Compile Error: Invalid foreign key relationship: Account.contacts when user create contact with assocate there parent account and insert mailing address in ...
0
votes
3answers
52 views

Pass selected value from html <select> to controller

I have to pass the selected picklist value by user from apex form using <select> and <options> html tag to a standard controllers picklist field. I am unable to get the values from Page ...
0
votes
0answers
15 views

i want to perform search operation according to the selected check box and display the result in pageblocktable? [duplicate]

Visualforce Page <apex:page Controller="actionSupportController"> <apex:form> <apex:pageBlock> Household Name: <apex:inputText value="{!ID_c}"/> ...
1
vote
1answer
25 views

action support returning empty value

when i click on the column action event working when i open the log coming with null value... values are not displaying in the table. <apex:page controller="actionSupportController"> ...
1
vote
2answers
71 views

Trigger -Error Invalid initial value type List<User> for Set<Id>

Requirement - Checkbox in User NoOwner__c. If it is checked and I am going to update account Owner then it needs to throw an error else needs to save record. I am getting error Invalid initial value ...
0
votes
1answer
37 views

How to get the Salesforce Lookup id from visualforce to apex

I have public Opportunity destOpp {get; set;} in my apex code. I have <apex:inputField label="Source Account" value="{!sourceOpp.AccountId}" /> in my vf page. After I select an account from ...
2
votes
1answer
32 views

Why am I exceeding viewstate when using button+actionfunction, compared to using commandButton?

I have a very simple page: <!-- vf page --> <apex:page standardController="Challenge__c" extensions="upsertChallengeResponse" sidebar="false" tabstyle="ChallengesVF__tab" ...
0
votes
4answers
68 views

Find the number of open Opportunities

I want to find the number of open opportunities related with Account object and autofill the custom field of Account object with the numbers of open opportunity...
0
votes
2answers
35 views

Trouble relating second object for dynamically added records From Controller Extension

I'm editing this, as I just realized that the two objects are being saved, but they are not being related. These two objects are related via lookup. I'm relatively new to coding, and haven't been ...
2
votes
0answers
28 views

Error messages not getting removed on reloading the page,when I've overridden the view with a visualforce page

I have overridden the standard view of Account object with a visualforce page,& using a custom button that is used to send email to Account,using a custom field,Email__c.The error appears if we've ...
2
votes
2answers
27 views

Advance search in Visual Force

I need to implement advance search (smart search) in my VF page. I will have a search input field, once i start entering values in the field it should query the values in the DB accordingly and ...
1
vote
1answer
42 views

Redirect to Visualforce Page After Record Type Chosen

I am trying to redirect users to a VF page after the record type is chosen when creating a new Case. If a particular Record Type is chosen, the use should be brought to a VF page, anything else ...
0
votes
0answers
17 views

How can we chain Lightning component controller call outs to Apex controller

I want to chain lightning component controller methods based on results received from first to second callout. I tried multiple ways but without success 1. Continuation - possibly only for Vf pages ...
0
votes
1answer
21 views

cover standardcontroller extension in test class

public DiscoverOrg_ConflictResolver(ApexPages.StandardController controller) { LoadPage(); // Research request start reportSubmited = ''; reportNotSubmited = ''; ...
1
vote
1answer
26 views

access custom object field in inline visual force page

I have two custom objects contact and property. I would like to embedd a visual force page in the contact custom object which would do the following. 1) Access a field in the contact object and fetch ...
1
vote
2answers
52 views

How to pass an array of a class from a helper to an apex controller

I have created a class with several fields like this: public class Tier{ @AuraEnabled public String Name {get; set;} @AuraEnabled public integer Min {get; set;} ...
2
votes
1answer
45 views

Get the specified child relationship Name from Parent

I have a VF component where I am trying to get related list(child) of any record( say Account, depends on the value I give in my VF Page). I have two attributes in my VF component , objectvar- which ...
2
votes
1answer
26 views

calculate EndDate based on only weekdays

I have a function which takes input as startDate and return the endDate where endDate is Date after 100 days excluding weekends. That is only weekdays are counted and not the weekends in the 100 days ...
1
vote
0answers
15 views

Bypass error rule in controller

I have a error manager rule in controller at quote line item level. Scenario is whenever a particular product 'X' is added by the sales manager ... dates field should be filled in. But if the same ...
-1
votes
1answer
48 views

How to clear the values of textbox on button click

VF Page: <apex:page controller="petwizardcontroller" sidebar="false" id="page"> <apex:form id="frm" title=""> <apex:actionFunction name="sayHello" action="{!doSearch}" ...
0
votes
0answers
17 views

How to get Updeteable field value and uneditable field value from VF page.

Actually here i am now trying to get the "value" input field's string but the problem is i am switching the text box of value according to the case Field value since few fields don't allow us to edit ...
3
votes
1answer
105 views

Uncaught TypeError: a.getAttribute is not a function

Scenario: I have a component that has an <aura:renderIf> within an <aura:iteration>. The <aura:iteration> references a component attribute called "selectedItems" to display a list ...
0
votes
1answer
41 views

querying related child object from parent in VF componenet

I am trying to build a reusable VF component which can return all the child of an parent object. I just assign the parent object in my VF page and rest is taken care by the VF component to display the ...
4
votes
2answers
83 views

AssignTo variable in attribute

I have a visualforce component as below: <apex:component controller="RecordDisplayController"> <apex:attribute name="objectName" description="An Sobject" type="Sobject" required="false" ...
1
vote
2answers
42 views

Invalid selectOptions found. Use SelectOption type in Apex error

I am getting the error stated in the question. I have used a <selectOption> list in my controller and in my VF page, I have used <apex: selectOptions>. What is the issue? I have attached ...
1
vote
1answer
27 views

get Object name in custom help page?

I've edited a custom object to include a reference to a custom help page. That page is a VF page with a controller class. For "Context-Sensitive Help Setting" I have "content Name" = "myCustomPage". ...
1
vote
1answer
29 views

Place input tag inline with a specific selectRadio option

I have a select options tag inside a select radio Tag. I am trying to achieve something in which I will have radio button with its label and then an input box in line. below is my apex code` ...
2
votes
0answers
29 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 ...
1
vote
0answers
29 views

how to bind map<String,map<String,String>> to vf page using javascript remoting

i have 1 @RemoteAction method which is returning map<String,map<String,String>> and i need to bind this with vf page. and this is the code i did till now : <div id="data" ...
-1
votes
2answers
50 views

how to call a VF page from another VF page using button?

This is VF page: Here I need to save 1 account record as well call another VF page <apex:page standardController="Account" extensions="displayRecordsInSF1Extension1" showHeader="false"> ...
1
vote
1answer
37 views

I have no errors but my pagination is not working

I wrote a code which includes several functionalities and in which pagination also includes, my other functionalities are working good but the pagination is not working. Can anyone please look at it. ...
1
vote
1answer
21 views

Handle Extra Coma in CSV from code level

in Certification column there are 3 certificate which are mention as 1x,2x,3x when i parse csv it shown an error An error has occured reading the CSV fileList index out of bounds: 2 how to handle ...
2
votes
3answers
39 views

How to get all fields in VF page using custom controller?

This is my Controller: public class exportContactRecords { public List <Contact> contactList { get; set; } String query; String allFields = ''; public ...
0
votes
2answers
76 views

how to call another visualforce page from an apex command button

I have an Apex command button in my Visual Force page. Using that button I want to call another visual force page, which in turn should call action function written in the controller. Please advise.
0
votes
1answer
43 views

Pass Visualforce input fields to Controller - get Unknown property 'AccountStandardController.CallCycle__c'

I am struggling to get my simple VF page to work as I keep getting an 'Unknown property 'AccountStandardController.CallCycle__c' error. Below is my VF form, and below that my Controller. I first tried ...
-6
votes
2answers
100 views

Controller in MVC Architecture [closed]

Please help me to choose 2 options from below which represents controller in MVC architecture? Custom Apex and Javascript code that is used to manipulate data StandardController system methods that ...
0
votes
0answers
22 views

How to delete selected profiles from the pageblocktable?

I am displaying the selected profiles on another pageblocktable but my requirement is I want to display the selected profiles on another pageblocktable and at the same time I want to remove those ...
-1
votes
1answer
25 views

how can I save a record by inserting values from a new window?

This is my visual force page: <apex:page Controller="saveRecordFromWindow" id="page"> <script> function openWindow() { var myWindow = window.open( "myWindow", ...
4
votes
2answers
54 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
19 views

Visualforce Page Will Not Accept Values Given Via Url

I created a controller that stores several values and then redirects the user to a Visualforce Page with those values. My goal is to have the Visualforce input fields populate. The url values populate ...
0
votes
1answer
19 views

Controller Using ApexPages - Failing Test Class

I cannot get this controller's test class to pass at all. Please help me understand why I cannot write a test for ApexPages.currentPage().getParameters().get(). I assume the SOQL string should pass ...
2
votes
1answer
39 views

Two Visualforce pages, one controller?

Is it possible to have two Visualforce pages that use the same controller? I have a VF page that need to be reorganized. It needs to show a slightly different set of fields and show them in a ...
0
votes
1answer
40 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
57 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
48 views

How to access the fields of a List

I have a below query in my controller class: List<Skill_Review__c> results = [SELECT Id,Name,Skill__c,Level__c FROM Skill_Review__c where Interview__c ...
1
vote
1answer
28 views

Access Custom Object from Managed Package

I have a question . Let's say that i have a controller and a visualforce page in a Managed package . Can I make the controller so that it accesses the Custom object in the Org ( in which the package ...
0
votes
1answer
100 views

Copy a list to another list

I have a custom object called skill_Review and I am creating a list in my controller using: List<Skill_Review__c> skillRev = new List<Skill_Review__c> List<Skill_Review__c> ...
0
votes
0answers
42 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 ...