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
1answer
28 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
15 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
87 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
21 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
9 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
34 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
31 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
18 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 ...
3
votes
0answers
43 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 ...
1
vote
0answers
16 views

Invoking a lightning component using a button

Is there a way to invoke a lightning component by clicking a button? lets say I have created a reusable Case creation Component which i want to call on click of a button called "Open a Case" It only ...
1
vote
1answer
26 views

Test Class for Approval Process

I am trying to set up a test class to test a Visualforce page button which, when clicked, submits a custom object record to an approval process using a controller method. When I try the test below, I ...
0
votes
3answers
31 views

Certain Opportunity Owners are hung up on VisualForce page

I have a VF page that the user is directed too when they click on an opportunity and they are the opportunity owner. The page just asks the user simple compliance questions. It's working fine but on ...
2
votes
1answer
28 views

Passing a variable into startUrl to be used on next page

I am working on trying to pass a variable from one VFP to another. Currently, I'm doing the Site.login(username, password, startUrl), and I technically can pass in a variable through the URL, however ...
1
vote
1answer
28 views

Displaying an alert from the controller in a new page

I have a save method in an apex controller which returns a page reference(This method is called on clicking the save button from the visualforce page). I have 2 scenarios On click of save button ...
1
vote
1answer
18 views

Error for Test Class on Controller

I have a pretty simple test class on a controller, which worked fine in my developer environment. However, I am now moving it to a sandbox and I'm running into an error: System.DmlException: Insert ...
2
votes
1answer
9 views

cant find standard controller that is a custom class from a managed package

I have a VF page that calls a custom object from a managed package as a controller, so, I am seeing something like this: < apex:page standardController="mlk_MarksCustomObject__c" > I cannot find ...
2
votes
1answer
17 views

Visualforce Lookup Inputfield not passing value into controller

I am trying to pass the value of an inputfield for a lookup field from my Visualforce page to my controller. I can't seem to figure out why, but it continues to return a null value. See below for ...
2
votes
2answers
87 views

Unknown Property on Controller Extension

So I have a standard controller and an extension that I'm trying to use to call back a list from a different object to use in a PageBlockTable. In the visualforce page I declare my standard ...
1
vote
0answers
15 views

Salesforce Lightning creating a destroy method to destroy an expense

so I am fairly new to lightning and APEX - however I like to throw myself in the deep end of things because it makes me research and find out new aspects. However with this destroy function I have ...
1
vote
1answer
50 views

Refresh visualforce page after save button [closed]

I created a visualforce page with some input fields and a save button and there is also an output field which is based on the input fields. After I click save, the output field remains the same and I ...
3
votes
3answers
93 views

Revert/rollback record states on error

Consider the following block of code that is called on save of a basic data entry page: public PageReference save() { // accounts is binded to VF page for (Account a : accounts) { ...
1
vote
3answers
38 views

Reload Visualforce Page After Update

I have a Visualforce page on a custom object that has a commandButton to update a field on the custom object. When that field is updated, a Process fires that then creates a case based on the ...
0
votes
2answers
36 views

Error: Compile Error: expecting a right parentheses, found 'sc' at line 4 column 99

This is my Controller global with sharing class treeInlineController { public String actId{get;set;} public treeInlineController(ApexPages.StandardController sc){ ...
0
votes
0answers
17 views

attachment show in binary format on contact inline vf page, but i want to show attachment

public class AttachmentImgController{ public contact con{get;set;} public String recId; public String typeFile{get;set;} public Blob csvBlob{get; set;} public String ...
0
votes
2answers
25 views

Fetch User input value to class [closed]

I want to have an User input value from Apex page into class and put it in a string. Can someone show me the way to do it?
0
votes
0answers
12 views

Show eventbrite organization page on custom visualforcepage

So here is the thing, My eventbrite acc and salesforce acc is connected. I can create event in salesforce which will become live in eventbrite through API. Now i want to create one VF page in ...
1
vote
0answers
28 views

when i press and alphabet auto complete will not working on textbox

this is my page <apex:page controller="ContactCheckEditController"> <apex:form id="frm"> <apex:pagemessages /> <apex:actionFunction name="check" ...
1
vote
1answer
23 views

Error in jquery response error

I have the following piece of code var sContactId = jQuery("[id$=contactId]").attr("value"); jQuery("#responseErrors").html("Check"+sContactId); Now, it is not printing the value of sContactId. I ...
0
votes
0answers
22 views

How to make pageblock Fields editable on click of inputCheckBox

when select inputCheckBox it will not convert row in editable mode this is my class public class ContactCheckEditController { public List<cContact> contactList {get; set;} public ...
4
votes
1answer
109 views

Call controller method from different class

How can I call a method structured like this: public with sharing class Calculator { private ApexPages.StandardController l; public Calculator(ApexPages.StandardController l) { ... } ...
0
votes
2answers
29 views

Redirect page to record

So this is my controller which create new event and save event. in this i have hardcoded page redirect link '/a3I/o'. i dnt want this to hardcoded. I want to do something like it will redirect to ...
2
votes
2answers
24 views

Highlighting a table row value

I have the following piece of code. <apex:repeat var="myPubA" value="{!Active.NoSharing.MyAuthorList}"> <ul > <li ...
1
vote
1answer
19 views

How to create contact detail page using controller? [duplicate]

How to create contact detail page using controller? <apex:page standardController="Contact" extensions="ContactDetailController"> <apex:form > <apex:pageBlock mode="maindetail" ...
0
votes
1answer
43 views

when update particular contact accountid count will not increase or decrease performOnAfterUpdate method not working

below this is my trigger trigger countRecord on Contact (After insert, After update) { contactTriggerHandler handler = new contactTriggerHandler(); if(Trigger.isInsert){ ...
0
votes
1answer
42 views

pass html input checkbox to controller

i try to get the value from <input type="checkbox">and pass it to my variable on controller but i always get 'Argument cannot be null'. i already try using inputHidden to <select> tag and ...
2
votes
3answers
130 views

pass html multiselect picklist value to controller

i have problem with passing multiselect picklist value to controller, and i want to insert it to picklist(multiselect) field. what should i do to achieve this ? here's my visualforce ...
0
votes
1answer
28 views

Test Class - Created User, but User.Name = null

I have been trying to create a test class for a Visualforce page controller and have run into a slight issue. I have total coverage except for a section of the controller that looks at the ...
0
votes
1answer
22 views

Visualforce Controller Test Class - 0% Coverage

I have built a Visualforce page that allows the user to quickly choose a file and attach it to the record without having to go to an additional page. I have been attempting to build a test class for ...
2
votes
1answer
54 views

Pass parameter from html select tag to controller

I want to pass parameter that selected from html select tag to my controller (assign it to string "city") what should i do to achieve this ? --Visualforce-- <select> <option value="" ...
3
votes
1answer
103 views

Error Message in Visualforce page

I have a visualforce page which has a apex:pagemessage tag. A method on the controller is checking if a field in the visualforce page is valid. I want to display an error message but I do not want ...
1
vote
1answer
82 views

How to call/create test class for a RemoteAction

This is my apex controller: public with sharing class EventsController { @RemoteAction public static ASPHPP__ASPayment_TXN__c getPaymentTXNs(Id oppID, Id eventId, ID co_id, ...
0
votes
1answer
45 views

Test class for controller

I am new to salesforce and i am writing a test class for custom controller and it is showing 64% code coverage Here is my visual force page in which that controller is used <apex:page ...
1
vote
1answer
36 views

How to assert a response from callout when the webservice callout happened in a controller method? Experts advice please

I have built a visualforce page, a controller. The methods in controller contains the logic to make a webservice callout and assigning the response to class variables. Static utility methods have ...
7
votes
1answer
100 views

Visualforce components within components

Fairly new to creating Visualforce components and I'm attempting to reuse some of my front-end mark up with multiple components that used in a parent component. At first I question if this was ...
1
vote
1answer
36 views

Why would I NOT want to use static controllers?

For starters, using static variables/methods resolves view state issues. I don't seem to notice any difference in VF behaviour when using static versus non-static methods either. So when would I use ...
-1
votes
1answer
43 views

show or hide table using javascript(not with salesforce rerender attribute)

To save processing time I want to call method from javascript instead of controller. This is my method in controller public void showSupplier() { showSup = true; } public void ...
5
votes
2answers
272 views

ApexPages.currentPage().getParameters().get() returning NULL when testing

Update: I have changed it as proposed by @mkorman 's post to: Controller Class [...] public String myId {get; set;} [...] public PageReference controllerMethod(){ [...] System.Debug(myId); ...
0
votes
1answer
36 views

Replace the Lookup with Picklist using VisualForce and Apex

I want to convert a User Lookup to be displayed as dropdown (Picklist) in add screen. We have a Custom Field to display Users in Opportunity Create Page. I have written a Custom Apex Controller by ...
0
votes
1answer
30 views

Create Test in this following Controller [closed]

How to create a test class from this controller? public List<Event_Logo__c> getEventLogo() { con = new List<Event_Logo__c>(); con = [SELECT Id, (Select Id, Name, ...
1
vote
1answer
85 views

Apex FieldSet - Bring values from Visualforce input field to Controller

I have a visualforce page that is currently iterating through the fieldsets within the OpportunityLineItems object. Everything is displaying correctly with the input fields where the user needs to ...