2 risposte
Hello @KARTIK BHALLA,
Basically a wrapper class is used to meet the different requirements like i worked on a scenario where i getting the account id as a input and i need to return the account name, related opportunity count , and related contact is present or not, so if we think it is possible by soql query , but instead wrapper class gave us a simple syntax we need to :
1. Declare Variables in Wrapper Class:
2. Create a Method Accepting Parameters:
3. Create an Object of Wrapper Class:
4. Assign Values to Wrapper Class Variables:
5. Return the Wrapper Class Object:
also refer:
https://youtu.be/CWoAGoLjr7c?si=trNp9IpzkfI1cCDW