+ Start a Discussion
Force.platformForce.platform 

dml on wrapper class list

can we perform dml on wrapper class list?
 i want to perform upsert operation on wrapper class list.
wrapper class dispaly two object data on vf and also able to enter data in one object on vf. n now i have to perform upsert operation on this list.
Pankaj PPankaj P
No, you cannot do dml operation directly on wrapper class list in apex. You need to segregate the list of 2 objects that are present in wrapper class just a for loop on list and 2 lists prepared and dml on each list.

Hope this helps you.
Thanks,
Pankaj.
Force.platformForce.platform
Hello Pankaj,
             i m very new to salesforce. can you provide some sample code for this