Recently while working in a visual studio workflow for SharePoint online, I got the below error: An unhandled exception occurred during the execution of the workflow instance. Exception Details: System.InvalidOperationException: Configuration ‘HistoryListId’ was not found and a default value was not specified. And also I got another error which says: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.InvalidOperationException: Configuration ‘TaskListId’ was not found and a default value was not specified.
The full error message looks like below:
RequestorId: 38d4fd8d-3663-e39c-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.InvalidOperationException: Configuration ‘HistoryListId’ was not found and a default value was not specified. at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation) Exception from activity GetConfigurationValue ParseGuid DynamicActivity<Guid> WriteToHistory Microsoft.SharePoint.WorkflowServices.Activities.OperatingWebContextScope Microsoft.SharePoint.WorkflowServices.Activities.WriteToHistory Sequence TrainingRequestAddin.TrainingRequestNotification.WorkflowXaml_715346fd_61ca_43fd_8c2c_5a6df723ed57
And
RequestorId: 38d4fd8d-3663-e39c-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.InvalidOperationException: Configuration ‘TaskListId’ was not found and a default value was not specified. at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation) Exception from activity GetConfigurationValue ParseGuid DynamicActivity<Guid> Sequence Microsoft.SharePoint.WorkflowServices.Activities.OperatingWebContextScope Microsoft.SharePoint.WorkflowServices.Activities.SingleTask Sequence TrainingRequestAddin.TrainingRequestNotification.WorkflowXaml_715346fd_61ca_43fd_8c2c_5a6df723ed57
System.InvalidOperationException: Configuration HistoryListId was not found and a default value was not specified
Then we wanted to manually trigger the workflow also. So in the workflow properties, I select “Manual Start Enabled”. Now next time when I deployed the workflow I got the above error.
To resolve the issue, we need to choose the Task List and History List. Select the workflow and then click on properties. Then choose the History List and Task List like below:
Once you select the History and Task list, the error will not come.
Read some SharePoint workflow tutorials:
- How to get workflow template id using javascript in SharePoint
- How to get workflow template id programmatically using JavaScript Object Model (jsom) in SharePoint
- SharePoint online task list form Approve Reject button disappears Visual Studio workflow
- the request message is too big. the server does not allow messages larger than 2097152 bytes in SharePoint Online visual studio workflow
- How to Activate Workflows can use app permissions Feature programmatically using CSOM in SharePoint
- How to hide approve reject workflow approval button from ribbon in SharePoint online using css?
- Errors were found when compiling the workflow. The workflow files were saved but cannot be run error in SharePoint online designer workflow
- Deploy sharepoint 2013 designer workflow into production in SharePoint online
- How to create a workflow using SharePoint designer 2013
- Difference between workflows and event receivers in SharePoint
I hope this will be helpful, to fix error System.InvalidOperationException: Configuration HistoryListId was not found and a default value was not specified.
Hello Everyone!! I am Bhawana a SharePoint MVP and having about 10+ years of SharePoint experience as well as in .Net technologies. I have worked in all the versions of SharePoint from wss to Office 365. I have good exposure in Customization and Migration using Nintex, Metalogix tools. Now exploring more in SharePoint 2016 🙂 Hope here I can contribute and share my knowledge to the fullest. As I believe “There is no wealth like knowledge and no poverty like ignorance”