Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Thanks for contributing an answer to Salesforce Stack Exchange! Here is the output of apex where complete data is passed to apex. What have you tried so far, post some code. The answer can be definitely improved/fine-tuned based on real business use case scenarios. Now the catch is what if we are interested in sending complex data types from LWC to Apex methods. I tried to use keyset() to get key, but it failed. All the examples in documentation or lwc-recipe only discusses about fetching data. How to pass SObject List from a Flow to LWC - WordPress.com This will give output like the below image, Stop Serialization and Deserialization of Object In Apex. Salesforce is a registered trademark of salesforce.com, Inc. Start here for a quick overview of the site, Detailed answers to any questions you might have, Discuss the workings and policies of this site. Option 1 Pass back additional information in the returned Account list and then in the lwc use some code to generate a new item of data for us to display. Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. The best answers are voted up and rise to the top. When it comes to sending primitive data types from LWC to Apex it's pretty much straight forward. Values can be based on some condition. I will double check it but as far as i know i did a copy paste. Getting null parameter in apex controller from lightning controller, Passing Array of sObject to Apex from Lightning Component. Pass complex data types from Lightning Web Component to Apex methods We know how inconvenient it is to send wrapper object as most of the time, we need to use the existing apex method that takes it as a parameter. ["0068A00000BaRAQQA3","0068A00000BaRASQA3"], uploadFile(String base64, String filename, String recordId, List Is a downhill scooter lighter than a downhill MTB with same performance? Let me walk you through the process of getting all the fields of an SObject dynamically in LWC. If you need more customization than those components allow, use @wire to specify a Lightning Data Service wire adapter. What do hollow blue circles with a dot mean on the World Map? Firstly how to declared the list apexList in apex.Secondly how to iterate the list in apex to get data for these two obejects. I'm learning and will appreciate any help. Using Class Constructor. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. In short its necessary , so Is it possible for which i am asking above?? Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Example: Generic SObject Input for Screen Components - Salesforce Now the catch is what if we are interested in sending complex data types from LWC to Apex methods.