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.
0
votes
2answers
21 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
22 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
46 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 ...
-1
votes
1answer
20 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
47 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
18 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
34 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
34 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
45 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
43 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
21 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
40 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
27 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 ...
-3
votes
1answer
47 views
how to call an Attachment in a test class
Can any one help me out.I have a controller and their is a test class written ,but the code coverage is low.How to call an Attachment in a test class.Any help very much appreciated.
Controller :
...
0
votes
1answer
29 views
How to return a list in a list in a custom controller? [on hold]
I am trying to return a list of products of a custom object (Agreement) so I can reference in a custom component to then be used in an vf email template. The custom object has a lookup to Opportunity ...
2
votes
0answers
29 views
Custom Controller that mimics standard controller
I want to use a visualforce page as a Global Action but according to documentation I need to create a custom controller. I am not doing anything outside of the standard controller so I am wondering if ...
2
votes
1answer
26 views
Updates from nested apex repeat in Visualforce not being posted to server correctly
I am having a custom object where there is a list within a list within a list.
On the Visualforce page I am presenting it using an apex:repeat and apex:inputText fields.
When I try to change and ...
-1
votes
0answers
20 views
How to write unit test for Controller Extension?
Basically the controller has a URL parameter that it uses to query an object and its child objects. It then displays the data as well as input fields where applicable. Then the user can save the data.
...
1
vote
1answer
22 views
AJAX - Can I reference a method from the controller by url?
I am wondering if I can use the standard $.ajax, $.post or $.get with visual force. If so what do I put in the url? Can I get the url of the method I want to make a call to?
4
votes
3answers
455 views
Which of these error handling patterns is more efficient?
I'm working on a cleanup of some older apex code, and I've noticed two distinct patterns being used to handle errors when saving records.
One uses a try-catch block to try to update the records, and ...
1
vote
1answer
29 views
Can you catch a thrown error down the line?
I'm trying to setup a method to make sure all the data I need is available before proceeding to the next part of my component. So I have something like this:
public Boolean getIsDataLoaded(){
/* ...
0
votes
2answers
15 views
Unknown Property Error on custom VisualForce page
Page:
<apex:page showHeader="true" sidebar="true" controller="ComposeEmailController">
<apex:stylesheet value="{!URLFOR($Resource.bootstrap, 'sf-bootstrap/css/bootstrap.min.css')}"/>
...
0
votes
1answer
28 views
Test Class Error :System.QueryException: List has no rows for assignment to SObject
When i run the test class in Apex Test Execution,i get error for the controller as
Error Message System.QueryException: List has no rows for assignment to SObject
Stack Trace ...
0
votes
1answer
21 views
Access standard controller in test class
Below is my controller and test class, i am getting an error while compiling test class, how can i use controller object in test class?
Controller
public class ERFormController
{
public ...
1
vote
1answer
37 views
Check if an error occur during batch process
Good day everyone, I create a batch process class. The problem I have at the moment, is that how will I check if there is an error encountered during the batch iteration. In my case, I've tried to ...
0
votes
1answer
56 views
unable to convert parameter to apex type got arraylist [duplicate]
Is there a way to pass a sObject with RemoteAction from JavaScript to Apex?
I want to create a bunch of sObjects. What is the right way to pass their information from JS to Apex with RemoteAction?
...
1
vote
2answers
56 views
Reference a child field in grid or create grid from standard controller
Is it possible to reference a child field in a grid when using a standard controller from an object? Or do I have to create a custom controller? If I do have to create a custom controller then do I ...
2
votes
3answers
36 views
Calling actionFunction from JS
I'm working on a vf page/controller. All of the code at this point is about 800 lines so I wont post it all but I have posted the items that are relevant.
Basically, there are 4 forms on the VF page. ...
1
vote
1answer
53 views
Visualforce Components: When your controller extends an abstract class, can you override the parent instance?
At the time I still have not received any feedback about my previous question so I went ahead with a different approach to my problem. Bare with me part of my problem might be because of how I changed ...
2
votes
1answer
117 views
Why Don't Visualforce Wrapper Class Getter/Setter Methods Not Exist?
I have a wrapper/inner class like so:
public class parameter{
public String source { get; set; }
public Integer year { get; set; }
public String field { get; set; }
public ...
0
votes
0answers
40 views
Base URL in VF Component
I am creating a vf component and was stuck to add a base url to href.
<apex:component controller="OpportunityReminder_cls" access="global" rendered="{!NOT(Isnull(FLstWrapperString))}">
...
0
votes
0answers
44 views
check if current user is the Delegated Approver, or the record owner
in my VF page I would like to show a button Open in SalesForce if the current user is the approver of the record creator.
how could I check that in my VF Formula?
currently I am checking if the user ...
0
votes
1answer
60 views
How to update a value from an <apex:inputField> in visualforce?
that's my second question today , i am new to salesforce and i am facing problems every day.
I am iterating through a map as indicated in this visualforce code:
<apex:repeat ...
0
votes
2answers
42 views
Unable to access Controller getter in VisualForce page
Controller Class: TestController.cls
public class TestController {
private integer num { get; set; }
public TestController() {
num = 100;
}
/* If I define the getter as ...
0
votes
0answers
20 views
Missing debug logs from sending a Visualforce Email Template
I have a Visualforce Email Template with associated component and controller. The template is functioning fine but I can not figure out how to view debug statements from the controller after sending ...
0
votes
1answer
32 views
Set values access in constructor [closed]
I have a Set populated in a method. I need the values in the contructor so that each time load those values are static. Can I do that?
Method
public List<SelectOption> getValue()
{ ...
1
vote
1answer
33 views
how to show the textbox value of one vf page in another vf page as a label
i am beginner in salesforce, i have made one vf page there is textbox and button in that page on button click i want to show textbox value of my textbox as a label in another vf page on button ...
0
votes
0answers
14 views
Error: “Formula Expression is required on the action attributes” on simple VF page [duplicate]
I am trying to make a simple VF page for some configuration external to SF. The page contains a simple link to an externally hosted URL. I am facing a problem when I click on the link. It throws a ...
0
votes
1answer
40 views
how to write a test class using @remoteAction
@RemoteAction
public static void manipulateincentive(string incentiveid)
{
List <string> lstinput = new list<string>();
...
3
votes
1answer
48 views
How to solve Async Future Method Inside Loops Issue?
Can any one please help me solving this,
The below trigger will create an guid(random_string) and it will be passed to an controller and from controller i'm hitting the Post the data to our URL. ...
0
votes
1answer
35 views
how to redirect on page load event
My requirement- I am overriding addProduct button of opportunity with one vf page the task is if pricebook is not selected then redirect to pricebook selection page otherwise to my vf page.
My code ...
0
votes
0answers
20 views
what approach to take to build a search filter on visualforce page
i am a beginer in salesoforce,want to build a search panel on the vf page in which there will be 3 fields product name,operator(equal to,not equal to etc) and value if the searching will be based on ...
3
votes
3answers
110 views
Dynamic SOQL Query not accepting custom object id in where clause
I have a structure question today regarding a dynamic SOQL query that I seem to be entering the wrong custom object id value for in the WHERE clause.
I have retrieved the custom object id from my ...
0
votes
1answer
28 views
how to fetch productname,product code,family and list price
i am trying to fetch fields with this code.
public with sharing class opproductcls {
public List<pProduct> getProduct2() {
if(ProductList == null) {
ProductList = new ...
0
votes
0answers
12 views
how to get mobile number from the signature which is send my email sender from pattern mobile number
in debug log get this message below
DEBUG|--match--> Matcher:[delegate=Matcher[pattern=\D*?(\d\D*?){10}
region=0,591 lastmatch=]]
global class ProcessContactApplicantEmail implements ...
0
votes
1answer
37 views
how to extract and show signature in vf detail page?
this code is working and view all the data on my vf detail page but i want to extract signature like this is my mail
hello salesforce
--
Thanks and regards
Vipin Indora
mob no- 1234567890
i want ...
1
vote
2answers
51 views
Redirection to another visualforce page, without opening the first one
I want to redirect to an intermediate visualforce page, whose functionality is to store the parameters passed in URL to a salesforce record(custom object). But the complex part here is, I want to ...
0
votes
1answer
24 views
apex:page recordsetVar query
I know that mentioning "recordsetVar" attribute in conjunction with standardcontroller in apex:page component will make it as a standard set controller.
Can you someone let know how that collection ...
4
votes
0answers
69 views
Process Builder issue
I have created one process builder to check the criteria for Opportunity creation if Owner.UserRole.DeveloperName is something then PricebookID need to be updated.
Hence it is working fine when ...