Questions tagged [constructor]

The tag has no usage guidance.

10 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1 vote
1 answer
129 views

why Soql have to be inside constructor

hi I'm new to salesforce. I have a basic question hope you guys can help me. I'm doing "Display a SOQL query on a Visualforce page" but throughout all the information i found query have to ...
1 vote
0 answers
1k views

VisualForce: Dynamic Page Headers based on Parameters works as expected until adding actions to page

Background: I am working on a VisualForce page to allow our customers to 'Add to Calendar' from an email alert that they receive when we book an Event. The Apex page takes 2 parameters right now, ...
0 votes
0 answers
107 views

System Assert Initial List Size

I have a class that has a constructor that is defining a list. I want to assert that the initial size of the list is set properly. An error is being throw when I run my test class around verifying the ...
  • 3,329
0 votes
0 answers
33 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 ...
0 votes
1 answer
32 views

Should I be using a better OOP pattern (DI, Factory?) for this API callout with a big wrapper class

I'm trying to up my OOP game and utilize good patterns where I can. Recently I wrote some classes that essentially take a custom object (a quote) and build a very long/complex api request body using a ...
0 votes
0 answers
902 views

Call method with String return in another class

I'm trying to get required information (currentCompany()) via method: public without sharing class RemoveUserInfo implements Queueable { private List<User> users; private List<Account&...
0 votes
1 answer
308 views

Use invocable method on the MergeCaseController, error that i will not be able to use the invocable method on a constructor. thank you

I am trying to use the invocable method on Public MergeCaseController(ApexPages.StandardsetController controller) so that i can call this from a flow.. But i am having issues doing so, public ...
0 votes
1 answer
22 views

(re)Scheduled class with count. Initialized to 0, increased to 2. Don't understand why

I have a schedulable class that will be rescheduled again. This class contains a count. Here is how it is supposed to work constructor set count to 0 a run method increase count then test condition ...
  • 105
0 votes
1 answer
2k views

Error during LWC component connect phase: [Maximum call stack size exceeded]

I am trying to assign value to a property of my parent component's constructor method. Below is the html code: <template> {welcomes} <c-testfile></c-testfile> </template&...
-1 votes
1 answer
43 views

Constructor not defined: [PbxmlGroupConnection].<Constructor>(DataSource.ConnectionParams)

global class PbxmlGroupProvider extends DataSource.Provider { override global List<DataSource.AuthenticationCapability> getAuthenticationCapabilities() { List<DataSource....