PnP-PowerShell icon indicating copy to clipboard operation
PnP-PowerShell copied to clipboard

Get-PnPWorkflowInstance isn't working on SP2013 On Premise

Open pr-bn opened this issue 6 years ago • 2 comments

Hi, I am using the latest version (3.14.1910.0) of PNP for SharePoint 2013. Here's my simple script Connect-PnPOnline -Url http:// $web = Get-PnPWeb $list = Get-PnPList -Identity "Requests" -Web $web $item = Get-PnPListItem -List $list -Id 2850 $item (Checking if the item is returned)

Id Title GUID


2850 199937 2e491225-54cf-4ffe-8503-90287c4fb24e

Get-PnPWorkflowInstance -List $list -ListItem $item -Web $web

This is returning the bellow exception

Get-PnPWorkflowInstance : Cannot invoke method or retrieve property from null object. Object returned by the following call stack is null. "GetWorkflowInstanceService new Microsoft.SharePoint.WorkflowServices.WorkflowServicesManager() " At line:1 char:1

  • Get-PnPWorkflowInstance -List $list -ListItem $item -Web $web
  •   + CategoryInfo          : WriteError: (:) [Get-PnPWorkflowInstance], ServerException
      + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Workflows.GetWorkflowInstance
    

I have referred to the following articles https://www.reddit.com/r/sharepoint/comments/a410l7/questions_regarding_workflows_and_also_pnp/ https://sharepoint.stackexchange.com/questions/256205/get-pnpworkflowinstance-object-returned

pr-bn avatar Oct 11 '19 10:10 pr-bn

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Oct 11 '19 10:10 ghost

This is not working for SharePoint Online either. I am connecting to the site properly, can fetch the list properly, but when I run this it results in nothing returned. I have triple checked everything. Connection is correct, list name is correct, item ID is correct.

Get-PnPWorkflowInstance -List "TestList2" -ListItem 6

Also this is over a year old and still needs Triage??

robertcaretta avatar Dec 03 '20 17:12 robertcaretta