You need to sign in to do that
Don't have an account?
Pradeep Pradhan 21
sort all the elements in multi column sort when it s in parent child relationship in apex
hello everyone i have tried this code . please help me out other best possible sloution
public class multicolumn_sort {
public static void main(){
list<Account> accList=new List<Account>();
accList=[select Name,(select Name from Contacts )
from Account] ;
for(Account acc:accList){
for(Contact con:acc.Contacts){
System.debug('acc List-------->'+con.Name);
}
}
}
}
public class multicolumn_sort {
public static void main(){
list<Account> accList=new List<Account>();
accList=[select Name,(select Name from Contacts )
from Account] ;
for(Account acc:accList){
for(Contact con:acc.Contacts){
System.debug('acc List-------->'+con.Name);
}
}
}
}
Kindly refer these below links :-
https://salesforceglobe4u.blogspot.com/2020/03/how-to-display-account-and-its-related.html
https://www.w3web.net/display-account-related-contacts-in-lwc/
Thanks!