Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
-1 votes
0 answers
23 views

How to show related objects field values along with that object field in lightning record edit form in LWC [closed]

If this is not possible , what should be the way to display those multiple objects field value in lwc html? I have one object Account. Account object has two related object-- Contact Point Email ...
user avatar
-4 votes
1 answer
102 views

How to and retrieve , display the key and value of map<string,id> in LWC which is returning from an apex wrapper class

Apex method @AuraEnabled(cacheable = true) public static List<WrapperClass> pageResourcesFalse(String cardName){ List<id> documentId = new List<id>(); List<string> ...
user avatar
0 votes
0 answers
65 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 ...
user avatar
  • 29
1 vote
2 answers
74 views

How to serialize an object and string variable?

objectApiName = 'Account' newFieldConfigJson={"Type":"Text","Value":"Name","Order":"8"} I have these two values that I need to ...
user avatar
  • 41
0 votes
0 answers
13 views

test class for apex class which has wrapper class [duplicate]

public class MyOrderListController { public List<WrapperClass> WrapperList {get; set;} public class WrapperClass{ @AuraEnabled public string PName{get; set;} @...
user avatar
0 votes
1 answer
31 views

How to access the values from while returning the Object

public class TestWrapperClass { public class InnerWrapper{ private String name; private String location; public String getName() { return this.name; } ...
user avatar
  • 1
0 votes
2 answers
72 views

LWC record display issue

I have two objects in my org question and answer which has a lookup relationship between them. I wanted to create a LWC component which displays one question with multiple answers but I am unable to ...
user avatar
  • 41
0 votes
1 answer
422 views

Make onclick row in table LWC

Hi guys ^^ I am new in programming and Salesforce. I have little problem I wrote an apex class and now I want to make a custom tabele (that can't be a datatable) because in feature I will write a ...
user avatar
  • 13
0 votes
0 answers
490 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 ...
user avatar
  • 13
0 votes
2 answers
102 views

Wrapper and custom object in list

How to show this elements in html. I am new in salesforce and programming public with sharing class StockMarketSharesWrapper { @AuraEnabled(cacheable=true) public static List<Wrapper> ...
user avatar
  • 13
0 votes
0 answers
64 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, ...
user avatar
  • 1
1 vote
1 answer
203 views

Visualforce Error : Map key true not found in map

Visualforce Page <apex:page docType="html-5.0" showHeader="false" controller="TaskRayController"> <apex:form > <html> <head&...
user avatar
0 votes
1 answer
49 views

Accessing @api variable wrapper fields

I am new to LWC and I have created the following wrapper: public class myWrapper{ @AuraEnabled public Object1__c object1 {get; set;} @AuraEnabled public Object2__c object2 {get; set;} } I ...
user avatar
  • 171
0 votes
0 answers
29 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&...
user avatar
0 votes
1 answer
401 views

global methods do not support return type of wrapperclass

i am getting of error global methods do not support return type of ContractResponseWrapper line is global static ContractResponseWrapper postMethod() i think i could'nt able to send wrapper class ...
user avatar
0 votes
1 answer
48 views

populate values in a wrapper class variable which is a list<wrapperclass>

responseSize = ParsedResponse.results.size(); if(tResults.keySet().size()>0){ for(Results re : ParsedResponse.results){ customObj tLocs = new ...
user avatar
0 votes
1 answer
312 views

How to use Wrapper Class in constructor and call it in Queueable?

My Queueable Apex class worked fine before but after discovering Apex PMD ruleset, found that using >4 parameters in any method or constructor is not best practice. I tried searching up answers ...
user avatar
  • 1,061
1 vote
1 answer
34 views

Problem passing a wrapper class from LWC to Apex

I am having trouble passing an apex wrapper class from LWC into APEX. Apex @AuraEnabled public static void myMethod(SomeData theData) { system.debug('theData is ' + theData); } public class ...
user avatar
  • 4,441
1 vote
1 answer
292 views

Two arrays from seperate objects, one common Id. How to merge them into a wrapper class

So for this is what i have and i have zero clue on how to continue. What i do know is the Product2 Id is what links to the arrays together, to end up displaying like so....and i have no idea exactly ...
user avatar
  • 464
0 votes
0 answers
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 ...
user avatar
1 vote
1 answer
120 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 ...
user avatar
  • 39
0 votes
1 answer
104 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&...
user avatar
  • 431
1 vote
1 answer
220 views

How do we implement a custom put() method for a wrapper class in APEX?

I'm looking to create a generic wrapper APEX class with few property fields (string type for now). Here is what my class would look like: public class wCustomWrapper { public String customProp1; ...
user avatar
  • 5,596
0 votes
1 answer
62 views

Testclass for wrapper class implements Comparable and contentdocumentlink

I don't know how can I test my contentdocumentlink, in the log I got the information EXCEPTION_THROWN [18]|System.QueryException: Implementation restriction: ContentDocumentLink requires a filter by ...
user avatar
  • 431
0 votes
1 answer
33 views

List does not return my manual field and how can I sort the list

I want to create a list of tasks, events, files and notes, so the sales man have just one list for all activities. The list works, but I still have a few questions. I add to each list a manual field ...
user avatar
  • 431
0 votes
2 answers
104 views

How can I add different objects in one List?

I would like one list of different objects (Task, Event, Notes). In mycode I create a wrapper class for the different objects and I display the list on a visual force, but there are still 3 lists just ...
user avatar
  • 431
0 votes
1 answer
301 views

How to write Wrapper Class and using Visualforce page to display multiple objects data. Best Practises [closed]

I want to display 2 objects like Job Deal object(Job Deal Code, Job) and Recruiter Objects records fields in a single table. How to write VF page using wrapper class
user avatar
  • 1
1 vote
1 answer
1k views

Getting error : Nested object for polymorphic foreign key must have an attributes field before any other fields

My mock body looks like : '{"totalSize": 1, "done":true, "nextRecordsUrl":"WWW.testurl.com","records":[{"Name":"Fund1", "...
user avatar
0 votes
1 answer
74 views

String to DateTime Conversion when updating on the field directly in Apex

for (Lead__c l: leads) { l.Last_updated__c = String.ValueOf(leadResponce.leadData.lastUpdated); } how can I converted the value coming form the JSON from the wrappers while updating a field ...
user avatar
1 vote
3 answers
102 views

append wrapper class values if id are same

I have a List of type wrapper class having two variables let's say col1 and col2. I want to append all col2 values if their col1 is the same and store it as col 1 and col 2 in a new variable. Here is ...
user avatar
  • 295
1 vote
1 answer
622 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: ...
user avatar
  • 155
0 votes
2 answers
75 views

Error " List has no rows for assignment to SObject"

I am doing a wrapper class binding account and its related contact and opp record. For starters, there is only one Account with the name 'Account1'. 'Account1' only has 1 Contact and 1 Opportunity. My ...
user avatar
0 votes
2 answers
201 views

Trigger with Wrapper class

I have created a wrapper class in which I have Name and Rating variables which are string type. 1)I have pulled out Account with the name and Rating and wrapped it in a wrapper class and stored the ...
user avatar
  • 21
0 votes
1 answer
268 views

Lightning Web Component Accessing Attributes From Wrapper Class Without Explicitly Setting individual Attributes or Using Iteration

I've created a wrapper class and have denoted each attribute with @AuraEnabled public Class RecipientWrapper { @AuraEnabled public String FirstName; @AuraEnabled public String LastName;...
user avatar
0 votes
0 answers
62 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 ...
user avatar
0 votes
1 answer
316 views

How to access a wrapper class properties from html

I have the following apex class where I am returning a wrapper class back the lightning web component and access the values of that wrapper object from javascript and html to carry out some processing....
user avatar
1 vote
1 answer
113 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 ...
user avatar
  • 63
3 votes
1 answer
453 views

Is it possible to cast wrapper instance dynamically?

I wonder if it is possible to cast object parameter passed from LWC Component to specific instance of Wrapper class. In Example we have WrapperB that extends WrapperA and we want to cast data passed ...
user avatar
  • 635
0 votes
1 answer
27 views

Lightning:Datable returns blank

I am using a wrapper class in generating the values for a lightning:datatable, however no value is being rendered on the table. Apex Class: public class wrapperObject{ @auraEnabled public ...
user avatar
0 votes
1 answer
87 views

Need help on Apex Test Class for Wrapper Class

Can someone help me with how to write a Test Class for the below Wrapper Class... public class OppRelatedSolutionsController { public List<WrapperClass> wrapList{get;set;} public ...
user avatar
0 votes
0 answers
39 views

TEST APEX - How to cover size() > 0 in WrapperClass [duplicate]

I'm trying to cover a condition that verify if my list isn't empty. But no matter what i'm trying it cover the SOQL query but doesn't cover the if statement as you can see below. The way i'm trying ...
user avatar
0 votes
1 answer
344 views

How to sort list of dates in apex and return the entire record? [duplicate]

I have a custom object called Insurance which has a Start Date field. I am planning to use bubble sort to sort the records based on the Start Date. This is what I have tried so far and got confused as ...
user avatar
0 votes
1 answer
136 views

Need help in creating multiple lists from one query in Apex Class

I am trying to achieve a list like this (conWrapper:[BankName=abcd, Branch=main, phone=123456789], conWrapper:[BankName=abcd, Branch=main, phone=987654321]) From below class, public without sharing ...
user avatar
0 votes
0 answers
17 views

Sort List by CreatedDate [duplicate]

I have a following wrapper class: public with sharing class HistoryRecordWrapper { Id CreatedById; Datetime CreatedDate; Object Field; Object NewValue; Object OldValue; public HistoryRecordWrapper(...
user avatar
  • 41
0 votes
1 answer
61 views

Illegal assignment from List to List

i'm facing the following error while trying to save this. can someone tell me what im doing wrong please? public class GanttDTO { public class RecordDetail { @AuraEnabled public String identifier;...
user avatar
  • 7
0 votes
1 answer
92 views

user defined apex class

I need to build a wrapper that could essentially hold this format. { record: { id: 123 name: abc start: 1-jan end: 31-jan status: completed records: [{ ...
user avatar
  • 7
0 votes
1 answer
58 views

Trying to Display Information in a Wrapper Class in a pageBlockTable

I recently began working on integrating my Salesforce org with the NPPES NPI Registry. Ideally, I'd like the code to be able to send a callout to the NPPES Registry and query the NPI number and ...
user avatar
0 votes
1 answer
3k views

Wrapper class showing error 'Inner types are not allowed to have inner types' in apex

I am trying to create a wrapper class to hold the JSON response in my apex class. But I am getting the error ' Inner types are not allowed to have inner types '. Below is my wrapper class. public ...
user avatar
2 votes
1 answer
525 views

Insert Parent Child records from Wrapper

I have a wrapper class which has one attribute for Parent record and another list of child records. I'm getting this list of wrappers from my lightning component. Now I need to insert these records. ...
user avatar
  • 321
0 votes
1 answer
24 views

Constructor not defined error - error after setting date fields as null during object creation

I have created a wrapper class to create an Object and send it as a request to a third party system. It was working well. But after I added a two new arguments of the Datatype Date, I am getting the ...
user avatar

1
2 3 4 5
9