Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [controller]

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.

Filter by
Sorted by
Tagged with
1 vote
2 answers
55 views

How to mock when calling a factory class

Using below as a dummy example I can mock the service I'm calling, but I think there should be a better way other than I'm doing it when calling a factory class. Any suggestions? Thanks in advance. ...
Andrew L.'s user avatar
  • 847
0 votes
1 answer
30 views

Property type misidentification in VisualForce Page

I'm deploying all the code from a 1stGen Package to a new Scratch org, to improve our development/testing/release process. There were a few deploy errors but I've fixed all but two types. This is one ...
cyberspy's user avatar
  • 210
0 votes
0 answers
12 views

Integer and List<case> from Apex Class are not shown in Aura Component

I've tried everything, I've checked all the questions and answers, but I can't see the error. Can you please tell me why the numbers and cases are not displayed? System logs are output and it feels ...
Maria Petrova's user avatar
0 votes
0 answers
30 views

Loops are not handled in a Business Manage template

I'm creating a module for Business Manager, but when I render the template and try to use pdict to loop it, it works for the first loop, but only one loop per render. If there is more than 1 loop in ...
LuizEduardoMPF's user avatar
0 votes
0 answers
52 views

I am getting error because of the trigger event

I have a trigger which will call an handler trigger ASNSeasonalAllocationTrigger on ASN_POS_Item__c (after update) { FetzerCalculateTotalAllocatedForAUser.calculateQuantityReceived(Trigger.oldMap,...
Kavya's user avatar
  • 1
0 votes
1 answer
32 views

Render Error Message on VisualForce page with output panel

I want to be able to render an error message on the page if a case record variable Closed_Days_Beyond_30_Days__c is true but unsure how to make this work. If the boolean is true, set the error message....
Jeff's user avatar
  • 191
5 votes
2 answers
164 views

How to preserve string with newlines passing from LWC to VF controller for PDF rendering

I have a Lightning Web Component (LWC) which takes a text input from the user. The text input is entered via a lightning-textarea, i.e. can also contain text with newlines. The LWC contains an iframe ...
HeXor's user avatar
  • 287
0 votes
0 answers
34 views

How to use the List<Account> value created in ApexClass in Visualforce Page

My Apex Class is like this. public with sharing class displayWarning { ApexPages.StandardController controller; public displayWarning (ApexPages.StandardController controller) { this....
ttarikyuksel's user avatar
0 votes
0 answers
34 views

Trying to show FullPhotoURL on a visualforce table

On our org we're capturing a referral person (Referral_Person_Opp__c) on the Opportunity Object - this field is a look up on the User Object. I have created a simple table to show the top 5 referral ...
Timmy's user avatar
  • 11
1 vote
0 answers
86 views

Site.createPortalUser is unable to assign a profileId

public with sharing class RegisterModalController { public class CustomException extends Exception {} @AuraEnabled public static void register(String username, String password, ...
Justaguyhere's user avatar
0 votes
0 answers
25 views

Value set from JS controller does not reflect on CMP file

I am working on a functionality that hides a button and uses a wrapper for assigning a value (ex. wrapperClass.showButton = false). I checked the Apex debug and it is setting the wrapperClass....
Mareux's user avatar
  • 11
0 votes
1 answer
127 views

Unable to find action on Lightning Component

This is my code but I have the Error // DynamicRelatedContactListController.apxc public with sharing class DynamicRelatedContactListController { @AuraEnabled public static List<Contact> ...
Emin's user avatar
  • 1
1 vote
1 answer
308 views

LWC - How to make refreshApex work with public property passing from parent

Is there any way to use refreshApex to refresh data passing from Parent to Child? I have 2 components: Parent & Child. The parent will perform logic to make the data clean then pass to Child (list ...
Pam's user avatar
  • 107
0 votes
0 answers
196 views

Getting Error 'An internal server error has occurred' while passing invoice template html data from LWC to Visualforce Page to render as PDF

Html Code : <div class="invoice_container" style="width: 100%; max-width: 900px; margin: 0 auto; padding: 20px; font-family: Arial, sans-serif; color: #333; background-...
Pratik Bokade's user avatar
0 votes
0 answers
453 views

Salesforce LWC Worklog Timesheet add weekly hours problem

the purpose of the worklog creation code is to assign a project-based weekly assignment to the user and enter the daily working hours. Users need to be able to edit it and assign project-based ...
Fatih Serdar Gülsün's user avatar
0 votes
1 answer
561 views

Embedding a CRM Analytics Dashboard in Aura Component Filter doesn't work!

I am trying to filter a dashboard using an aura component, my dashboard works fine but filtering doesn't work. I get this error: Unexpected non-whitespace character after JSON at position 1 The ...
Bifre's user avatar
  • 11
0 votes
1 answer
999 views

Site Guest User can not send email in force.com site in salesforce

I have already searched it through what could be the possible reason for not being able to send a single email as a site guest user on force.com site in salesforce Site guest user's email should be ...
Jon Snow's user avatar
0 votes
0 answers
48 views

Record twice update alternative

I have this method in a controller class that updates the product on a custom object (Contract Modification) based on what the user selects in the UI. In this object i have a Section 'Validations' ...
Artur's user avatar
  • 9
1 vote
1 answer
23 views

Can two select use use the same value?

I'm trying to synchronize two selectList together using the following : <apex:selectList value="{!selectedOption}" size="1" onchange="myFunction()"> <apex:...
Azumi's user avatar
  • 13
0 votes
1 answer
53 views

need help accessing the returned value from controller to aura component`s helper class

var action = component.get("c.getCheckType"); action.setParams({"recordId": recordId}); I am trying to call a funtion from Helper class of an Aura controller to apex controller ...
simarjeet singh's user avatar
-1 votes
1 answer
165 views

Dictates what happens when a user 'goes back' (via browser button) from a Visualforce app

I have a visualforce app that takes an input and then displays a table of information from that input (via an external call in a connected controller). There is an issue where if a user tries to use ...
John Daniels's user avatar
0 votes
1 answer
132 views

Apex Test - setSelected() is empty!

Hi I'm having an issue with a non-static test method which is passed a list of records from the standardSetController. I've called setSelected() and an instance of the non-static method but when I'm ...
plateaued1's user avatar
1 vote
1 answer
271 views

Gack Error Id : 2020409769-104966 (551437190) when there is no constructor without parameters

When a Lightning Action is called from LWC and a DTO model instance is passed, where the corresponding DTO Model class doesn't have no arguments constructor, an internal error is shown: Gack Error Id ...
Patlatus's user avatar
  • 17.1k
-2 votes
1 answer
55 views

How to write test class for this? [duplicate]

public with sharing class ToggleController { @AuraEnabled(cacheable=true) public static List< Contact > fetchContact (Id accId, String status) { return [SELECT Status_c, ...
Guest's user avatar
  • 3
0 votes
0 answers
31 views

VF controller not maintaining instance variable value

public without sharing class PaymentSuccessController { public Boolean emailSent = false; private List<String> rlis; public List<String> getReceiptLineItems() { if (...
Robinson's user avatar
-1 votes
2 answers
51 views

How to combine these method into one?

public with sharing class bot{ @AuraEnabled(cacheable=true) public static List< Contact > fetchActive (Id accId) { return [SELECT Status_c, FirstName, LastName, Email FROM Contact WHERE ...
Guest's user avatar
  • 3
-1 votes
1 answer
145 views

Lightning Table Not Display Data

I've been wracking my head the whole day at this, I'm very new to Salesforce and trying to create a Lightning Component that displays Contacts and what Commission they've earned. I'm just not getting ...
Rad's user avatar
  • 3
1 vote
1 answer
137 views

Change the apex:commandButton value from 'Return to Uploader' to 'Done' from Javascript (Jquery)

I have a requirement to change the value of apex:commandButton from 'return to uploader' to 'Done' using Javascript(Jquery). Below is my VF Page code: <apex:commandButton style="float: right;&...
Rahul Allada's user avatar
0 votes
1 answer
47 views

Issue while passing inputfield value from vf to custom controller

I have a VF page through which upon selection it is creating an Agreement record. As per the current implementation record is created successfully but inputfield value is not getting passed to the ...
Snehal's user avatar
  • 35
1 vote
1 answer
368 views

"Failed to parse CONTROLLER for FaceMesh in Aura component"

I am trying to use the FaceMesh object from the MediaPipe library to detect and track faces in a video stream in my Aura component. However, I am getting an error when I try to save my component that ...
Himanshu Joshi's user avatar
1 vote
1 answer
73 views

Unknown Property Error "Create Apex Property" when creating Visual Forcepage

I am attempting to save a Visual Force page that is accepting input values from a flow and passing them into an invocable method. It keeps saying the custom object I'm using in the invocable method is ...
user avatar
0 votes
1 answer
243 views

Unknown Property Error using Custom Controller When Trying to Save Visualforce Page Pointing to a Controller

I am using an invocable method along with a controller to feed a list of records being returned from the flow and invocable method, into a VF Page in order to render multiple records with the field ...
user avatar
-1 votes
1 answer
67 views

Visualforce Page: Group by Company and Consecutive Date Ranges

I have created a Visualforce Page .pdf to output Candidates and their previous Work Experiences. On the Work Experience records there is a lookup field for Company as well as fields for Title, Start ...
Jeff Callahan's user avatar
0 votes
1 answer
59 views

SFRA - Cartridge for payment methods returning an empty list

I'm currently exploring how to extend Salesforce's API. I currently have a Controller that tries to retrieve the payment methods available. The problem is that it's returning an empty list. There are ...
PMoura's user avatar
  • 11
0 votes
2 answers
307 views

Unable to pass parameters to visualforce page - Error "Value provided is invalid for action parameter 'templateId' of type 'Id'"

I have a visualforce page that I'm using to redirect a user to a second and final visualforce page in an attempt to bypass a CSRF Token request (it's from a managed package). I can't seem to get the ...
KB2021's user avatar
  • 83
-1 votes
1 answer
25 views

AccountContactRelation Variable In Apex Controller

I'm not receving any errors in the following, however the table in the VF page is not rendering. Would appreciate any advice on what is incorrect here, or if I'm completely going about this wrong. ...
George__202's user avatar
1 vote
1 answer
90 views

Updating Controller to Include Tasks Related To Account Opportunities

I have been asked to update a Controller used for a custom 'Recent Activities' LWC on the Account layout. Right now the Controller is querying Tasks related to the Account and displaying them in the ...
sp2's user avatar
  • 77
0 votes
2 answers
223 views

Visualforce - Rich text substitute style= "" with style="margin-top: 0pt; margin-bottom: 0pt;"

I have three different issues. To start with, we have a custom solution to generate contract/offer documents (PDF) through Visualforce. The terms and conditions are saved in a rich text field of ...
Giorgos Galaios's user avatar
0 votes
1 answer
603 views

Input on Visual force page form with Controller

I am new to visual force pages and have gone through some trailheads but am stuck on this part. Basically I want to submit an id from a contact record on the page and from that I want to query my ...
MarkC5000's user avatar
  • 141
0 votes
1 answer
591 views

How to add an object into another object - ES5

var filters = {'sort': 'asc', 'query': 'id=1'}; var data = {}; data.search = {'type': 'manual'}; Object.assign(data.search, filters); When using ES6 this code works correctly. But when it's in ES5 I ...
LuizEduardoMPF's user avatar
1 vote
2 answers
197 views

How to make a button disappear after clicking on it in vf page?

I created a save button in vf page VF Code <apex:page controller="Buffer"> <apex:form > <apex:pageBlock > <apex:pageBlockButtons location="...
Ali Baba's user avatar
2 votes
1 answer
131 views

Not able to change the name of a contact from a vf page?

VF Code <apex:page controller="Buffer"> <apex:form > <apex:pageBlock > <apex:pageBlockButtons location="top"> <...
Ali Baba's user avatar
-1 votes
1 answer
631 views

Update an object that is indirectly related to another object in a list

I have a list of custom object (Meeting Note) and I want to be able to edit a custom field (Firm Type) from another object (Net Prospect Score) that is indirectly related to the Meeting Note object. ...
Questioner51422's user avatar
-1 votes
1 answer
106 views

how to call a function of vf page script from vf page controller

I have a VF page and in script tag of that VF page I have a function. Now I want to call that function from VF page Controller. How can I call VF page script function from its Controller bcoz i want ...
Vipin Sharma's user avatar
0 votes
1 answer
162 views

VF Page is getting refreshed when clicked on an Enter key in apex:inputText box

I have an VF page which has the apex:inputText. When I click on Enter button, the whole VF page is getting refreshed/rerendered for no reason. I have no onkeypress events on top of the inputText box. ...
Rahul Allada's user avatar
0 votes
1 answer
664 views

Aura Component Attribute Value

I would like to set a lookup id value for an Aura attribute, but it doesn't work unless i hardcode it. Instead I need to retrieve it from the lookup on the current recordId. How is this possible to do?...
Brian23Gt's user avatar
  • 119
1 vote
1 answer
44 views

How to avoid saving other records in a custom VF page

I created a custom list of Event records using a custom controller and Visualforce page. In the list, the user can edit an Event but after saving the change, it also changes the last modified date of ...
Questioner51422's user avatar
1 vote
1 answer
773 views

LWC controller returns empty objects

guys! I have a problem. Every time, when I'm trying to execute quick action i see this error-message: [e.opportunity is undefined]. Can somebody help me with this issue? Controller: import { ...
Yan's user avatar
  • 13
0 votes
1 answer
179 views

Field Integrity Exception occures when importing library in js controller

I'm trying to import pdf.js to my controller. I've created a static resource called "pdf" and attached pdf.js file to it. Then I'm trying to import that with ES6 import keyword but when I ...
user avatar
-1 votes
1 answer
311 views

Pass multiple parameters from jscontroller to jshelper

I'm trying to filter the outcome of my code. Essentially, I have two dropdown menus where I pick values -- user and state. I have no problem working with a single value (user). But can't figure out ...
Slava's user avatar
  • 29

1
2 3 4 5
28