This tutorial, we will discuss how to fix error An unhandled exception occurred during the execution of the workflow instance. Value cannot be null error.
Recently While working in a SharePoint designer workflow, I got an error which says like below:
RequestorId: d37a725d-0bba-65b8-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ArgumentNullException: Value cannot be null. Parameter name: Input at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmark manager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmark manager, Location result location)
Well, I searched a lot to got to know what was the exact issue. Since I do not have access to the ULS logs, so it is difficult to get to know what is the exact issue.
Finally, after putting lots of logs to history action, I came to know about the issue.
An unhandled exception occurred during the execution of the workflow instance. Value cannot be null error.
I had a people picker field in the form and that is not a mandatory field. But in each item update, I was trying to send an email through the Send Email action. I was putting the people value in the To field of the email
So when people were putting an email id in the people picker then the workflow was working perfectly, But when people were not putting any email id then that it was sending the “System.ArgumentNullException: Value cannot be null” exception.
So if you will try to send an email where there in no email id in the people picker then this error will come.
You may like following SharePoint tutorials:
- How to add edit task form url inside SharePoint 2013 designer workflow email?
- How to Trigger Sharepoint 2013 Designer workflow on a list item by calling REST API using jQuery?
- How to send an email using designer workflow in SharePoint Online or SharePoint 2013?
- App Step in SharePoint 2013 Designer Workflow
- Deploy SharePoint 2013 designer workflow to different site in SharePoint 2013
- Delete list item after specific duration using SharePoint designer workflow
I hope this tutorial helps to fix the error An unhandled exception occurred during the execution of the workflow instance. Value cannot be null error. which comes in the SharePoint designer workflow.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SPGuides.com