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
Thomas Schmidt 11Thomas Schmidt 11 

FlowOrchestrationWorkItem use in apex

Hi, i built a dynamic approvalprocess with FlowOrchestrator. I would like to display the oben FlowOrchestratonWorkItems in a RelatedList on the RelatedRecord. As "FlowOrchestrationWorkItem" is not offered as related List i tried different appexchange-tools (EnhancedRelatedList for example) and also they couldn´t use the ObjectsAPI "FlowOrchestrationWorkItem".
Finally i wanted to built a LWC and i am not getting my recors querried. When querrieyng in Apex Anonymous it works

"FlowOrchestrationWorkItem item = [  SELECT Name, Label, Status, RelatedRecordId, AssigneeId
    FROM FlowOrchestrationWorkItem
    LIMIT 1 ];
system.debug(item);"

but as soon as i want to use it in a class i can´t deploy the class to my org "Invalid type"
User-added image
 Can someone help me and tell me what i am doing wrong?

best regards,
Thomas
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Thomas,

Can you confirm if the issue still exists?

Thanks,