Questions tagged [wrapper-class]

Used for organizing data to be 'Wrapped'. Typically allows for better manipulation or sorting of data.

76 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
1answer
894 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 ...
3
votes
1answer
330 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
0answers
188 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 ...
2
votes
1answer
78 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
0answers
394 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
0answers
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
1answer
98 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
0answers
2k 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
1answer
55 views

Unable to send Wrapper class as a return type in @invocableMethod

We created a wrapper class and calling from SS_NBA_APIResponse class. Here i am getting an error that i can't send wrapper class as a return type. will you please help me how to send the wrapper data ...
1
vote
1answer
421 views

Sending list of objects from LWC works with wrappers but fails with list of maps

I have a LWC that sends the following list to apex 0: Agent_Mobile_number: "999999999999" Call_Date: "2021-05-08" Call_Remarks: "LOL" __proto__: Object 1: ...
1
vote
1answer
81 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
1answer
28 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
1answer
867 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
0answers
37 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
1answer
56 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
0answers
378 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
1answer
245 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
1answer
281 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
0answers
359 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
0answers
47 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
0answers
878 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
0answers
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
0answers
41 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
0answers
40 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
0answers
28 views

I am trying to display a set of values calculated in apex , using Aura components , but i am getting null values

<aura:component implements="force:lightningQuickAction,force:hasRecordId,flexipage:availableForAllPageTypes,Force:hasSObjectName" controller = "Contact_Info" access="global&...
0
votes
0answers
23 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
1answer
37 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&...
0
votes
0answers
52 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
0answers
18 views

How to pass value from one VF page to another and refresh page where value is sent(Both vf pages will be used as Components on Lightning record page)

I have to create 2 VF page (casecreate and KnowledgeArticles) Both components will be placed on Lighting Record page and these pages will be used as Components Case create page is created from where ...
0
votes
1answer
363 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
1answer
23 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
1answer
68 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
1answer
228 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
1answer
379 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
1answer
470 views

Wrapper class and displaying data in table lightning

Need your help in structuring my wrapper class. Price agreement Header (Parent): Has 3 child.Distributor object : Distributor_Eligibility__c ,Product :Product_Pricing__c,Enduser object ...
0
votes
1answer
182 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
1answer
219 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
1answer
111 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
0answers
130 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
0answers
166 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
1answer
40 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
0answers
43 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 ...
0
votes
0answers
38 views

Trying to Display a sample JSON response in Visualforce Page

What am i doing wrong? I have taken the json response I got from the webservice callout and trying to display the response in Visalforce page. However the button 'Submit' is not making its way to the ...
0
votes
2answers
281 views

Boolean value set in a wrapper not showing correct

Hi I a trying to set a Boolean value in a wrapper based on a condition. Wrapper Class public class Wrapper{ public String pf {get; set;} public Boolean show {get; set;} public Wrapper (...
0
votes
2answers
3k views

Rendering data from Wrapper Class into Lightning Data table

Hi I'm trying to render data from a wrapper class it's coming up with row but values are empty. Component: <aura:component implements="force:lightningQuickActionWithoutHeader,force:hasRecordId,...
0
votes
1answer
31 views

Apex:param not calling method

Hi I have requirement of producing a list in home layout with number is records available in different conditions and on pressing a button redirecting to the specific list view I came up with the ...
0
votes
1answer
573 views

Assigning Custom Setting value to Custom object Field

/***********Custom setting **********/ Map<string, CountryCO__c> codes = CountryCO__c.getAll(); string pb; list<string> pb1=new list<string>(); for (...
0
votes
0answers
210 views

InputHidden not working with actionFunction

I'm trying to pass the value of an html input tag to an wrapper class into my controller. I'm using input tag because I need the slds style and others validation that I can't with a simple apex:...
0
votes
1answer
197 views

Make field Mandatory when corresponding record button is clicked

I have the following code in my Lightning Component <aura:iteration items="{!v.wrapAccountList}" var="arItem" indexVar="index"> <tr> <div class="slds-truncate"> <...
0
votes
0answers
144 views

How to convert JSON String to list<Class> and pass it as Wrapperlist on component

Hi am not able to get WrapperList working. I have tried this so far. Here i want to pass the variable values of the response class - latestStatus into the Wrapper and display all the "history" ...