Questions tagged [wrapper-class]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
890 views

Test Class for Comparable Wrapper class

I am trying to write a test class for a Comparable Wrapper with little success. The wrapper class pulls in two objects to make one single list. I have two issues... I don't know how to cover the ...
0 votes
1 answer
2k 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
2 answers
1k 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
3 answers
1k 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
1 answer
552 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
1 answer
2k 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
1 answer
303 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 ...
1 vote
2 answers
220 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
1 answer
1k 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: ...
0 votes
1 answer
1k 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
1 answer
34 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
1 answer
431 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 (...
1 vote
1 answer
537 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
1 answer
496 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
1 answer
2k 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 ...
1 vote
1 answer
1k 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, ...
2 votes
2 answers
1k 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
1 answer
912 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 ...
0 votes
1 answer
2k 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. ...
0 votes
1 answer
1k views

Parse Json string to Salesforce object? [closed]

How to map json string with salesforce object(consider Lead)??
-3 votes
1 answer
73 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
1 answer
171 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 ...
1 vote
2 answers
937 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
1 answer
2k 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
2 answers
384 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
1 answer
3k 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
1 answer
48 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
1 answer
1k 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
1 answer
962 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 ...
2 votes
1 answer
265 views

Binding issue: ui:inputText and Wrapper

We are trying to convert an application written using Visualforce to Salesforce Lightning. We have following code in our lightning component. The component displays the values querried from the object ...
0 votes
0 answers
146 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" ...
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 ...
0 votes
1 answer
724 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 ...
2 votes
1 answer
3k 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
0 answers
268 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
1 answer
41 views

Combining Picklist Options

I have to create a picklist to replace a lookup to prevent my users from seeing all of the lookup records. It throws an error when it is blank when we go to edit it so I had to write it like this: ...
2 votes
3 answers
1k views

SOQL Query Limits in Wrapper Class (using dlrs)

I have been trying to build a wrapper class which creates a junction Object (Delivery_Note_Line_Items__c) between two other objects (orderLine & Delivery_Note__c) depending on the Visualforce's ...
1 vote
1 answer
362 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 ...
1 vote
1 answer
1k 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 ...
2 votes
1 answer
4k 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 ...
1 vote
1 answer
417 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
1 answer
235 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
1 answer
524 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
1 answer
74 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;} ...
-3 votes
1 answer
352 views

Attempt to de-reference a null object -- while querying OrderItem

I am creating a vf page where a user can create multiple orderitem for a order by adding dynamic rows. When a user selects any product from product lookup, i have an actionsupport which will query ...
0 votes
1 answer
7k 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 ...
0 votes
1 answer
590 views

Wrapper class' validation based on an Existing checkbox

I am trying to implement a validation check before processing the selected record(s) from my Wrapper class's list. Here I am checking for one checkbox's value before processing the selected records(...
1 vote
1 answer
396 views

Loop trough pageBlockTable rows for validation

With regards to my previous question: Wrapper class' validation based on an Existing checkbox, I am trying to find a way to loop through the list of records in the wrapper class using the JavaScript, ...
0 votes
2 answers
6k views

Apex Class Non static AuraEnabled methods may not have parameters

I have an apex class which is the controller for a lightning component. In the class I want to pull through several different parts of different objects and return it in to the JS controller as one ...
1 vote
1 answer
2k views

Visualforce Page using Wrapper class in pageblocktable and apex repeat

Error: Unknown property 'VisualforceArrayList.lstWrp' I am trying to understand how does the pageblock table loop the repeat. I have done a similar page to account , contact object it worked fine ...

1
3 4
5
6 7
10