You need to sign in to do that
Don't have an account?
MJR
Displaying only contacts from display
List<Account>Acl = new List<Account>([Select Id,name from Account limit 10 ]); Map <Id,Account> mpn = new map<Id,Account>(); for (Account a : acl) { mpn.put(a.Id,a); } system.debug(mpn.get('0019000000PDZvkAAH')); and i should not cal the contact through dot operator ie (mpn.get('0019000000PDZvkAAH').contacts)
can any one suggest any idea
Change the code lil bit
You can access the contacts related to an account using the Id .
You can access related contacts by List<Contacts> cons = mpn.get('AccountId');
All Answers
Please elaborate on your requirement. Post more details.
Change the code lil bit
You can access the contacts related to an account using the Id .
You can access related contacts by List<Contacts> cons = mpn.get('AccountId');
thank u