function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Priyesh Misquith 12Priyesh Misquith 12 

How to Convert List<List<Cases> to List<case>

How to Convert List<List<Cases> to List<Case>
    public static void CaseAssign(List<List<Case>> lstCase) {
    List<Case> Cases=[select id from case where in :lstCase];
    List<case> caseupdate = new List<case>();
      for(case cc : Cases){
          Database.DMLOptions dmo = new Database.DMLOptions();
    	 dmo.assignmentRuleHeader.useDefaultRule= true; 
    update caseupdate;

ANUTEJANUTEJ (Salesforce Developers) 
Hi Priyesh,

I think you need to iterate over the lis<list<case>> to create one that want to use as per your use case.

Also, if this doesn't work let us know the usecase so as to check further and respond back.

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.