Questions tagged [wrapper-class]
Used for organizing data to be 'Wrapped'. Typically allows for better manipulation or sorting of data.
85
questions with no upvoted or accepted answers
3
votes
1
answer
334
views
Pagination using wrapper Visualforce
I have this piece of code that works pretty fine, for "next" and "previous" buttons - however, despite my efforts, I have not been able to write effective code for "first" and "last" button. Please ...
3
votes
0
answers
298
views
how to create wrapper class so i can show two list data in csv
Header title show proper but its data not showing in proper format because two repeat i have applied, i want work only with one repeat
this is my class
public with sharing class ...
3
votes
2
answers
1k
views
List on Wrapper class not visible in lightning component
I have an Aura component and I want to iterate through a wrapper class of objects, which has two lists as properties. While I can iterate through the wrapper class list, my lists come up as null when ...
2
votes
1
answer
565
views
Apex method receives null
Hi everybody I am trying to pass a wrapper from LWC to an apex class. The wrapper in js has the structure of the Apex class and the method that receives this wrapper is:
@AuraEnabled
public static ...
2
votes
1
answer
177
views
Query related to DML Example for AccountWrapper
I am trying to implement below example shown in screenshot :-
I want to check that for records where checkbox is selected, name field should not be null, then only insertion should happen, but name ...
2
votes
0
answers
494
views
Displaying the values of the wrapper class
I have a wrapper class inside a wrapper class which contains Assignment object and List of Projects.
public class projWrapper{
public Professional_Experience__c peWrap {get;set;}
public List&...
2
votes
0
answers
6k
views
Binding wrapper class variable to the value of an ui:inputtext in Lightning?
A similar question has been asked here
Binding behaviour on lightning components with ui:inputText/Checkbox components
I have 2 attributes of
1) Type = Wrapper class
2) Type = Sobject
My ...
2
votes
1
answer
148
views
Cannot get aggregate result (or anything good) with SOQL on multiSelct picklist
I have a working aggregate result class with a wrapper. Have made a couple of data sets pulled from cases and campaigns to get aggregate results of participants of both by date and other fields. ...
2
votes
0
answers
3k
views
Response size exceeded 15MB organization limit
I created this class that is requesting large amount of data, I was getting this error:Collection size 1,156 exceeds maximum size of 1,000. And then I found an approach to fix this error, the code is ...
1
vote
1
answer
509
views
Issue with formatting JSON for Rest API Post Request
First-time poster here so feel free to give me pointers on forum etiquette. I have been trying to teach myself Apex the past 2 months and I have a personal project that I am working on that involves ...
1
vote
0
answers
288
views
lightning tree grid not removing data on filter change
I have a lightning-tree-grid with a filter. When I initially select a value in the filter, it works fine. However, when I change the filter to a new value, the previously pulled records remain in the ...
1
vote
1
answer
4k
views
Lightning Datatable with wrapperclass
How can I use my wrapperclass with a lightning:datatable, Is that possible?
At the moment I use
<apex:pageBlockTable value="{!wrapperList}" var="wl" title="all activities&...
1
vote
1
answer
263
views
Not able to Set RecordId for Record in Apex Class
I am trying to create Account, Contact and User from Custom Aura Lightning Component but iam not able to set RecordId for the Record.
Below is the Method that iam using for Record Creation. In the ...
1
vote
1
answer
61
views
Display Leads and Accounts in same <apex:panelGrid>
In my controller I query for leads and accounts to display them in a googlemap and also in a panelGrid:
However what I fail to achieve is to display the leads and accounts in the same panelGroup and ...
1
vote
2
answers
1k
views
Lightning Web Component not loading while using Lightning-Input with Wrapper class variable
I am trying to build a simple Lightning Web component to allow capturing both parent and child record details on single form. To explain i am taking an example of capturings single Account and Contact ...
1
vote
0
answers
39
views
Wrapper needed? Looking for assistance
I am attempting to display a VF page listing contacts under a Tier Level. Tier Level is a custom object that is a lookup field on the account record. For example, a contact belongs to an account. ...
1
vote
1
answer
61
views
Issue displaying lookupfiled as inputField through wrapper classes
I am having trouble with lookupfield in visualforce page. My Problem is similar to the already existing post here Issue displaying lookup inputField through wrapper class results
I have followed ...
1
vote
0
answers
427
views
How to make dependent picklist dynamically in the pagebloack table in Viasualforce
I wanted to display dependent Picklist values in the Pageblock table.
for this i created a wrapper as
public class AcccWrapper
{
public Account Acc1{get;set;}
public List<...
1
vote
1
answer
261
views
Conditionally requiring field in PageBlockTable based on selection checkbox
I have a pretty standard use case where I have a PageBlockTable where you can select any number of rows to process.
//wrapper class
public class CaseWrapper{
public Boolean selected {get; set;}
...
1
vote
1
answer
316
views
How can to show 3 object records based on last modified date
I have 3 objects Action, Decision, Issue. currently My list view showing 3 objects records one by one. First all Action records, next all Decision records , last all issue records. I want to show all ...
1
vote
0
answers
434
views
Use wrapper class to handle multiple checkbox fields in a single object
I've been handed a task and I don't really know where to start:
I have a set of checkbox fields in one object.
These fields do not work well when I want to create a new View in Salesforce. Each ...
1
vote
0
answers
50
views
Serializing/Saving the values of a custom class?
Would it be possible to create a custom class whose values can be saved, and then possibly even reported on, without creating a custom object behind it?
The reason I ask for this is because this ...
1
vote
0
answers
883
views
how to add inputField in a PageBlockTable for Custom Object Using Custom Controller?
I have a custom object and I wanna add multiple records of the Custom Object using Custom Controller
I have written the Controller logic , I have created a wrapper class in Controller and I am ...
1
vote
0
answers
1k
views
Error in VF page as : Unknown property 'QuoteStandardController.Student' ,Apex class as :Error unexpected token: 'public' at line 40 column 0
Can any one help me out of this Error and Suggest me on the Code written .
I have created a vf page on Quote Object ,which should be generated in PDF .I have other objects which are has a relation ...
0
votes
1
answer
73
views
Unable to Wrap the Array of Json Object in apex using wrapper class
I am unable to wrap the Array of JSON object in apex using wrapper
JSON
{
"personInfo": {
"firstName": "Sudhanshu",
"lastName": "...
0
votes
0
answers
63
views
how to display filtering option for picklist values to successfully get records in visualforce page,Also how to provide grouping for same record name
I am trying to build one Visualforce page where I am able to get all approval history information. But I am not able to provide users the opportunity to filter records based on "Status". ...
0
votes
0
answers
429
views
Not able to Read Javascript Object passed from LWC to Apex Method
I would like to the read the Javascript Object response passed from LWC to Apex Method.
I have a requirement where SAP_Account__c custom object there exist a quantity 'Variable Quantity' field which I'...
0
votes
0
answers
99
views
Apex Custom Wrapper wrong property assignment
I've created the following wrapper:
public class MyWorkWrapper {
public String sobjectName;
public String ownerName;
public String recordId;
public String recordNumber;
public ...
0
votes
0
answers
541
views
Pass wrapper to LWC in datatable
Hello guys I am trying to pass a List of WrapperToLWC from an Apex class to a JavaScript file in order to get the wrapper and show its information in a lightning-datatable.
My Wrapper is this:
@...
0
votes
1
answer
534
views
Populate input field with data LWC problems
Hello everybody I am currently working on a Flow that receives the Id from the record where the LWC action is and pass it to the LWC.
The LWC is a form that shows some lightning-input and lightning-...
0
votes
1
answer
232
views
wrapper class does not match with json resulted from POST request
I have this apex class (coded by another developer)
@RestResource(urlMapping = '/thunder/contapj/*')
global class Thunder_SVC_ContaPJ {
public static Log_de_Integracao__c log = new ...
0
votes
1
answer
86
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
1
answer
186
views
How to populate records into specific wrapper structure?
There is an external system, from which I need to pull (via REST request) information about, let's say, brands and their categories. After the request, I need to collect the data in such structure:
...
0
votes
0
answers
110
views
VFP group header from map
Here is the inner/wrapper class and the VFP. I am currently getting this display where the Product_Group__c repeats for every code. I want to display the group once and repeat all codes and values ...
0
votes
0
answers
5k
views
Onclick row in Datatable LWC
Hi guys :) I am new in programming and salesforce.
I want to get to the apex and take a name of click company can you tell me what schould I wite in field message = 'NAME OF CLICK COMPANY';. When i am ...
0
votes
0
answers
576
views
JSON.deserialize returns null after deserialize
I've created controller to my Aura Component and it works.
Controller
public with sharing class B2B_RegisterFormController {
@AuraEnabled
public static void createLead(String lead, ...
0
votes
0
answers
27
views
Account with Event tagging of Yes or No in SOQL
My objective for this query is to show all of his/her accounts with tag of With Call Event (Yes & No). Meaning, Fields = "Branch", "With Call Event?"
I tried below class but ...
0
votes
0
answers
162
views
Add createddate and file size to wrapper class of contentdocumentlink
I am working on a visualforce page that displays names of contentdocumentlinks, and as the page is currently, it shows 2 columns: numbers and names of the contentdocuments. I want to add a couple more ...
0
votes
1
answer
776
views
Lightning Web Component - Combo box - populate value from Wrapper Class
I am trying to populate a list of contacts from the Wrapper class.However, I am not getting any values to display in the Combo box.
Here are my codes
Apex Controller Class:
public with sharing class ...
0
votes
1
answer
54
views
we are trying to create a reports with all sobjects even though it has relationship or not
We are trying show reports data in a table similar to Salesforce we are unable to show data like
Salesforce. please find below the screenshot for your reference.
0
votes
1
answer
347
views
Test class for Wrapper Class Method
I have wrapper class WrapperDemoClass, writting test class for this getwrapperObj method.
in the below test class how to read the wrapper class return list from test class.
Getting In valid type ...
0
votes
1
answer
675
views
How to fetch opportunity fields on a nested query included process instance and steps and work items
I've been struggling for quite some time now to figure out a way to provide the approvers within my company with a list of opportunities that are pending approval and by whom (we have two parallel ...
0
votes
1
answer
1k
views
Use of getter and setter methods for each field in Wrapper classes
I understand that wrapper class is like a custom object that you can define in an Apex class but I am not sure why getter and setter methods are used for each field in a wrapper class. What is the ...
0
votes
1
answer
309
views
Wrapper Class Error on Account Hierarchy
I have created one VF page which is on Account object to show the Account Hierarchy at the parent level.
Basically this VF page will show Contracts of all child Accounts on parent account.
I have ...
0
votes
1
answer
782
views
How to call an Apex method with Wrappers parameters from managed package?
I know, how to access to such a method: packageName.MyGlobalClass.doWork();
But what if our method gets a Wrapers parameters? Like this:
global with sharing class MyGlobalClass{
global ...
0
votes
1
answer
141
views
Checkbox selection uisng Wrapper is not passed to controller
This might have been posted several times but i'm unable to workaround this issue using apex & I also looked at all the existing questions similar to this. I have a list of Opps with checkboxes in ...
0
votes
0
answers
277
views
1/2 Test Methods Passed: first error: INVALID_CROSS_REFERENCE_KEY, invalid cross reference id: []
I have two test methods doing similar things, but one fails.
Test Code is:
@IsTest
private class CaseDocumentListControllerTest {
static testMethod void testGetContentDocuments() {
...
0
votes
0
answers
402
views
Structure of visualforce page using standard controller, extension and wrapper of data?
I am creating a component to add to a contact record that shows aggregated note data from two different sources.
Page
<apex:page id="AggergatedNotes"
standardController="Contact"
...
0
votes
1
answer
42
views
My wrapperlist is not showing up
I trying to create a table to provide metrics on the number of Account and Contact records grouped by state. So each state will have two number of count id.
Below is a code for my class and visual ...
0
votes
0
answers
90
views
Apex how to loop through returned records and pick the one that has a checkbox checked
I am trying to look through a list of records returned after I perform a search. Within my custom VF controller, I have another class/wrapper, where I am getting all of the fields. Is it possible to ...