cancel
Showing results for 
Search instead for 
Did you mean: 

Life Cycle status, Custom query and display columns configuration

Smitha_Challa1
Confirmed Champ
Confirmed Champ

Hello, 

 

This chunk of code follows a sequential way of getting a count of GetDocumentList.

Instead of doing one by one, can we do it in a bulk way to speed up the process.

             
Statuses.ForEach(status =>                {var configDBStatus = statuses.Where(stat => stat.status_id == statusId).First();                                         Queue q = app.Workflow.Queues.Find(configDBStatus.onbasequeueName);                    if (q != null)                    {                        //Set Queue Query Options                        QueueQueryOptions qqo = q.CreateQueueQueryOptions();                        qqo.ListType = QueueQueryListType.CurrentUserWorkItems;                        getCountForStatus.ProcessId = processId;                        getCountForStatus.StatusId = statusId;                        // getCountForStatus.Count = (int)q.GetWorkItemCount(qqo); // 'workitem' not equiv to 'document'                        getCountForStatus.Count = q.GetDocumentList(qqo, 99999, DocumentRetrievalOptions.None)?.Count() ?? 0;}
0 REPLIES 0