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
Patrick ThaiPatrick Thai 

Knowledge Article API - Assignment fields

Hello,

I would like to build a list of articles in Apex/Visualforce and display information about the Article assignment. But when I checked  the Knowledge Article and Knowledge Article Version schema, I found and indirect way to know the "Assigned To" User, by checking the ProcessInstances of the KnowledgeArticle. But I couldn't find a way to retrieve the Due Date and the Instructions.

Is there anyway to access to those fields ?

Thanks to anyone who could help.
NagaNaga (Salesforce Developers) 
Hi Patrick,

This information is stored in this object: ProcessInstanceWorkitem. 

Example:

SELECT ProcessInstance.targetObjectid FROMProcessInstanceWorkitem WHERE ActorId = '00GD0000001FGkT'

 This query will list all article that are assigned to this person.

Best Regards
Naga Kiran
Patrick ThaiPatrick Thai
Hi Naga,

Thanks for your reply. Your solution is actually what I meant when I wrote that "I found and indirect way to know the 'Assigned To' ". My question is more about getting the "Instructions" and the "Due date" which are not stored on the ProcessInstanceWorkItem. They were neither on the parent ProcessInstance, the grandparent ProcessDefinition, nor the related ProcessNodes (they related as children of the ProcessDefinition)