Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [wrapper-class]

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

0
votes
1answer
28 views

How to serialize REST Request from Wrapper class for existing Salesforce data?

I am trying to format my SObject data within a wrapper class to POST data to another Salesforce org from a custom Work__c object, but I am having a hard time understanding how to add an instance of "...
0
votes
1answer
43 views

How to create JSON string for REST callout from Wrapper class

I have found a lot of different examples of this, but I'm still having troubles accomplishing this. Here is the webservice which is working: //WORKING Webservice in target org @RestResource(...
0
votes
2answers
41 views

Access child records without using wrapper in apex controller

I have Question__c(parent) and Option__c(child) Master detail relationship. On page load I am able to pass the data to lightning component without help of any warapper class. Now on submitting the ...
4
votes
3answers
122 views

Adding a Wrapper Class to an External Class

I am confused about what is happening in a small section of some code. I have a class that has a wrapper class inside it. There is an external class that calls this wrapper class Models.add(new ...
2
votes
1answer
34 views

Nested Wrapper data not being return in lightning component callback

I currently have this very nested wrapper class, public sharing class ResultWrapper { //This wrapper is contain more wrappers that goes as far as 5 level deep. @AuraEnabled public ...
2
votes
1answer
30 views

JSON.deserialize on custom sObject not parsing related fields from lookup relationship

I've got a map whose values are a wrapper class. The wrapper class holds a custom sObject list, and the sObject in turn was queried to include related fields from a lookup relationship. Problem is, ...
0
votes
1answer
37 views

Data binding issue with wrapper class

This is a continuation of another question with code pared down as much as possible. I'm trying to create a series of pageblocktables on a VF page, each displaying some number of empty rows which ...
0
votes
1answer
71 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
0answers
18 views

Save input values in to a wrapper list

I want to set the input values from my table to a wrapper list. Because, when I add new row my table is rerendered, and all input values befor are missed. Here are my code example: My Class: public ...
2
votes
1answer
26 views

List Sort Using Wrapper Class

I created following Wrapperclass to sort quote based on ceratedDate global class QuoteCreateDateSortWrapper implements Comparable { public Quote quo; //Constructor public ...
1
vote
2answers
68 views

How to get code coverage on formula fields in a wrapper class

I need to get code coverage on UpgradeRate, PlusCount2, PremiumCount2 and PrestigeCount2, but what I have is not working. How do I get code coverage on these? In my custom controller, I have the ...
-1
votes
1answer
72 views

How to fix Wrapper class to insert/delete selected records?

When I use my Wrapper class to delete some records, my Select button doesn't work (without wrapper it works fine). So I even can't check, is my delete-code works or not. What is wrong here? Apex: ...
-1
votes
0answers
39 views

How to test for wrapper class and aggregate results array

I have a custom controller with some wrapper classes and I'm unsure how to write a test class for the wrapper classes. I'm also unsure how to get code coverage for an array of aggregate results. Right ...
0
votes
1answer
24 views

JSON string unserialize to APEX using wrapper class [duplicate]

I'm not able to get rows list....it is coming null from below code. public class ParsingTest1 { public ParsingTest1() { String jsstring = '{"totalsForAllResults": {"users": "...
0
votes
1answer
25 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
33 views

Does lightning:recordEditForm works for wrapper classes with an sObject?

I have a wrapper class which can hold a custom object record and some variables. However I want to leverage this out of the box lightning:recordEditForm for displaying the wrapper class records (...
0
votes
1answer
17 views

Maximum stack depth reached: 1001 inner class

I'm trying to export record on into a tab separated text file. In getting Maximum stack depth reached: 1001 in the inner class where i'm doing the piece of code and I have pasted full code in the ...
0
votes
0answers
29 views

how to do multiple coloumn sorting dynamically?

I want to do sorting in multiple coumns like. i am able to do sorting on one column click in complete table but not able to do sorting different columns in different sections. like this is my data ...
0
votes
0answers
21 views

how to sort different different wrapper list dynamically?

i want to sort the wrapper class where i have different different list of wrapper class. i want to do the sorting that different different wrapper list hold different different value, i am able to do ...
0
votes
1answer
496 views

Using wrapper Class in Lightning:Datatable

I am trying to set the data of the Lightning:Datatable from the wrapper class in server-side Controller. public class AccountWrapper{ @AuraEnabled public Account acct {get;set;} ...
0
votes
1answer
32 views

Using IF in a wrapper class

I have created a wrapper class which creates a record called Remittance_Advice_Line_Item__c, when a user selects a checkbox (called selected), and saves on a Visualforce page. The record(s) that are ...
0
votes
1answer
23 views

How can I dynamically add input fields in visual force on a button click?

I want to add a button "ADD NEW RECORD". When the button is clicked, a new row for input fields of accounts should be added along with the checkbox wrapped with it. How can this be done? EDIT: Also, ...
0
votes
1answer
74 views

How to Access Wrapper class variable in javascript?

Trying to access the wrapper class variable in javascript, but it's not serialized in apex controller. trying to get the value in for loop - mainly for validation purpose. function ...
0
votes
1answer
42 views

Lightning : Unable to update records displayed using wrapper class

Can anyone please help me in this? My initial Use Case Scenario was to display a list of records in a lightning component, and providing the ability for users to update the same records. This was a ...
2
votes
2answers
229 views

How to set inner class list as aura attribute? [closed]

I am in need of showing a list of records in a summarized format, say all records belonging to Type 1 are displayed first, followed by the records of Type 2, and so on. Usually in visualforce page, ...
0
votes
1answer
63 views

How to bind the wrapper class data into custom objects fields and display it in pageblocktable

I have created REST which fetching the data from pardot and displaying it on the vf page. It is working fine. But I need to store this data in the custom object's corresponding fields on the vf page. ...
-3
votes
1answer
56 views

facing issues with wrapper in wrapper class [closed]

I am trying to implement something like to display open carts and this repctive cart line items Something like Cart1 details Cartlineitem1 details Cartlineitemdetails2 Cart2 details ...
2
votes
1answer
22 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 ...
0
votes
0answers
29 views

How to sort a wrapper class in client side javascript in lightning

I have a wrapper class (contains Opportunity object as a variable and other Integer and String variables) which is iterated inside a table in lightning component. Columns in table --> Opportunity ...
1
vote
2answers
75 views

Passing List<WrapperClass> as a parameter from Visualforce to Lightning and to iterate over the List<WrapperClass>

This is my VF code, which runs on onclick <script> function func(data) { $Lightning.use("c:testingFromVFtoLightningApp", function(){ $Lightning.createComponent("c:...
3
votes
1answer
65 views

How do I correctly cast List in wrapper class?

I am receiving the following error in my Apex runtime: JSONException: Expected List<ApexBatch.SFError> but found { It's do with how I'm assigning the response to my wrapper but I'm not sure ...
0
votes
2answers
60 views

Visualforce page resets wrapper fields during rerender

I have a wrapper class to that include opportunity line items and a selectlist value set. When the page is rerendered, the oli fields are maintained, but the selectlist values are reset. I can't see ...
2
votes
1answer
182 views

CompareTo - Sort order by date in Wrapper class

I have recently had help creating a Wrapper class to combine 2 separate objects, Delivery_Note__c and Remittance_Advice__c, into one list, both with their own date fields. The list is then rendered on ...
0
votes
1answer
12 views

Test button's action that adds OpportunityLineItem

I have a problem with one code's part. Controller (a part): public void click(){ for(WrapperClass wrp : wrapperRecordList){ if(wrp.isSelected){ ...
-1
votes
1answer
149 views

Combining two object's records and sort by date

I have 2 lists from different objects which I would like to combine into one in a Visualforce component. The objects are not directly related, but both have amounts and a date which i am trying to ...
0
votes
1answer
35 views

Test coverage for a wrapper class which has no methods and constructor in it

I have below kind of wrapper class which has no methods and constructor. public class PP_SI_Wrapper { public class checkBoxWrapper{ @AuraEnabled public String que; @AuraEnabled ...
0
votes
1answer
27 views

Null pointer exception when using {get; set;}

I'm trying to build a custom VF quick action on the Case object that allows users to update checkboxes for case fields and also lets them add some comments that will later be posted to chatter, but ...
1
vote
1answer
114 views

Sorting list by custom field multiple times

I am working on an apex trigger. I have a list that I need to sort by a date field, do some processing, then sort by another date field, and do more processing etc 5 times. When I do the initial SOQL ...
0
votes
0answers
54 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
0answers
24 views

Language has to be specified in HTTP header

Salesforce endpoint accessed thru AJAX: $.ajax({ type: 'GET', url : 'https://ap5.salesforce.com/services/data/v42.0/support/knowledgeArticles', headers : { 'Authorization' : 'Bearer '+ '...
1
vote
1answer
44 views

Wrapper class Referencing?

How do I reference my wrapper class in my prepareshipment method? My goal was to set tNumber and location to = my fields on my shipment object. In my VF page I want tNumber and Location to display ...
0
votes
0answers
65 views

Help with VF email template to override collection size limit

I am using a wrapper class code I found here but I still get collection size error. I get the error: core.email.template.TemplateRenderingException: Collection size 1,589 exceeds maximum size of 1,...
1
vote
1answer
85 views

Save Redirects to blank page

When saving the visualforce page, it redirects to a blank page. Can anyone advise as to why it is not redirecting to the exact url for the current page cited in the PageRefrence at the bottom? When ...
0
votes
0answers
56 views

How to do total and grand total along with checkbox functionality by using wrapper classe

I have a requirements as below using checkbox functionality:- *i need to search list of products based on search string(this i have completed) *I need to make multiply of field1,field2 and render it ...
2
votes
1answer
832 views

Creating Generic Related List Lightning Component

I am trying to create a simple, reusable component that allows me to list related records in an easy to read way. I want to be able to use this component a few times on a single record, and I would ...
0
votes
1answer
106 views

Muti check box using wrapper class is not working [duplicate]

I'm trying to display the selected checkbox row's values in vf page using wrapper class concept. But instead of the selected records, it is displaying all records values. here is my code. Controller: ...
0
votes
1answer
29 views

Adding a record from selected table row

I have a wrapper class which updates selected rows from the standard object orderItem, with details from a custom object called Delivery_Note__c. A change in requirements has meant that I have had to ...
-3
votes
1answer
57 views

To show the Opportunity table sorted by Amount field in ascending order in lightning [closed]

I am working on the requirement in Salesforce Lightning in which I have to display the table for Opportunity object with row sorted by amount field in ascending order. Apex class: Public class ...
-4
votes
1answer
33 views

Vf page not showing the output

I have written wrapper class. But the visualforce page is not showing the output. public class Task17empadd { public Task17employee emp {set;get;} public Task17address addr {set;get;} ...
0
votes
1answer
428 views

Nested For Loop and SOQL Best Practice

I am in need of looping through three Objects: Opportunity, OpportunityContactRoles, and a custom object we will call CR__c. My question is: is it better to write a Wrapper class for these three ...