A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Get all content with status "Awaiting your review"

Vote:
 

I am looking for a solution to get all content with a status "Awaiting Your Review" when Content approval is enabled. I know its available in Task Pane but I want to access this through code.

#208890
Nov 04, 2019 15:30
Vote:
 

Hi Rich,

You can get like this-

using EPiServer.Approvals.ContentApprovals;

ContentApprovalDefinition definition;
IApprovalRepository approvalRepository;

var approvals = await approvalRepository.ListAsync(new ContentApprovalQuery
{
    Username = "user",
    Status = ApprovalStatus.InReview,
    DefinitionID = definition.ID
});

More info-

https://world.episerver.com/documentation/developer-guides/CMS/Content/content-approvals/working-with-content-approvals/#Listingapprovals

#208912
Nov 04, 2019 20:02
- Nov 05, 2019 14:59
thanks man that what I was looking for
Ravindra S. Rathore - Nov 05, 2019 16:40
Your welcome Rich.
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.