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
-2 votes
0 answers
28 views

i'm trying to display the values on my vf page and they are not coming through so as i'm running the debug i'm getting this as i

<apex:page controller='bulk_controller' applyHtmlTag='false' showHeader='false' renderAs='PDF' > <html> <!-- ... existing code ... --> <body> &...
Andile Mkhala's user avatar
0 votes
0 answers
31 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
42 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
22 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
53 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
124 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
  • 97
0 votes
0 answers
72 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
220 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
269 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
486 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
39 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
22 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
39 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
0 votes
0 answers
15 views

I am not getting Any value in dataMapQuarter Map

drawingOilTrialMonitoring = [Select Id,Action_Taken_Date__c,Additive_Addition__c,After_Top_Up_Concentration__c,After_Top_Up_Date__c,After_Trial_Image__c,Before_Top_Up_Conecntration__c,...
user131644's user avatar
-1 votes
1 answer
91 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
77 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
255 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
  • 16.1k
-2 votes
1 answer
53 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
30 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
50 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
0 votes
0 answers
259 views

Lightning Flow Navigation using Aura Component

//auracomponent.cmp file <aura:component access="global" implements="lightning:availableForFlowScreens"> <div class="slds-align_absolute-center" style="&...
SalesforceAllTheWay's user avatar
-1 votes
1 answer
87 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
0 votes
0 answers
19 views

actionFunction - controller method doesn't run even though oncomplete does

I am trying to get a controller method to run using an onclick actionFunction, but the method does not appear to execute, even though the oncomplete does. Here is the code: Controller: public with ...
apex2022's user avatar
  • 143
1 vote
1 answer
110 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
46 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
234 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
0 votes
0 answers
35 views

When I preview my VF Page it renders blank (nothing is in the preview). What is wrong with my code? Or am I just testing it wrong?

When I preview my VF Page it renders blank (nothing is in the preview). What is wrong with my code? Or am I just testing it wrong? Things of note: It's using an invocable method and returning a list ...
user avatar
1 vote
1 answer
63 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
148 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
61 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
53 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
239 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
22 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
79 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
  • 67
0 votes
2 answers
180 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
347 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
434 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
179 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
124 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
522 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
91 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
111 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
560 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
  • 109
1 vote
1 answer
41 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
622 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
144 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
228 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
0 votes
0 answers
2k views

How do I filter data related to selected field box in my lightning data table in LWC

Hello Guys._ Guys, I have an issue with my lightning datatable Current table The problem is when I want to show the data with the current broker selected, for example, if I select "Accurate ...
Alex Barón's user avatar
0 votes
1 answer
637 views

How do I append something to a string until last character?

I'm asking how to append 3 types of strings (initial, middle and final) to each character of an input string example: "hello" -> I want to have: initialAppend+H+middleAppend+E+...
MashaMasha's user avatar
0 votes
0 answers
614 views

Guest use receive error No profiling information for SOQL operations

Guest user receives an error after pressing redirect button in VFP 14:55:47.2 (40002254)|CODE_UNIT_FINISHED|VF: /apex/dossierattachmentsform 14:55:47.2 (40024393)|EXECUTION_FINISHED 14:55:47.43 (...
frra's user avatar
  • 21

1
2 3 4 5
28