1

We have CRM 2016 Update 0.1 (note feedback section does not have 2016 in dropdown only 2015)



Exception thrown: 'System.NullReferenceException' in System.Activities.dll



I have Microsoft Dynamics CRM Custom Action Workflow Activity that returns number of string parameters, if one of them set to null, after workflow exits, first exception is thrown from System.Activities.dll



it should not crash this way, strings can be null



Potential place of it:

at System.Activities.WorkflowApplication.Invoke(Activity activity, IDictionary`2 inputs, WorkflowInstanceExtensionManager extensions, TimeSpan timeout)

at System.Activities.WorkflowInvoker.Invoke(Activity workflow, IDictionary`2 inputs, TimeSpan timeout, WorkflowInstanceExtensionManager extensions)



Stack Trace:

Workflow execution crashes here is stack trace :



>Workflow '{90D4D6A9-EE98-49BF-9DCC-6F51233A009C}' failed due to error: Unhandled Exception: Microsoft.Crm.Workflow.Services.InvalidCustomActivityExecutionException: System.NullReferenceException: Object reference not set to an instance of an object.

at NAS.CRM.Workflow.Services.ABR.ABRService.GetBusinessByABN(String abn)

at NAS.CRM.Workflow.GetBusinessNameByABNActivity.Execute(CodeActivityContext executionContext)

at System.Activities.WorkflowApplication.Invoke(Activity activity, IDictionary`2 inputs, WorkflowInstanceExtensionManager extensions, TimeSpan timeout)

at System.Activities.WorkflowInvoker.Invoke(Activity workflow, IDictionary`2 inputs, TimeSpan timeout, WorkflowInstanceExtensionManager extensions)

at Microsoft.Crm.Workflow.SynchronousRuntime.SynchronousWorkflowActivityHost.ExecuteWorkflowUsingInvoker(Activity workflow, ICommonWorkflowContext context)

at Microsoft.Crm.Workflow.SynchronousRuntime.SynchronousWorkflowActivityHost.StartWorkflow(WorkflowActivationData activationData, ICommonWorkflowContext context)

.

I've created this bug in Microsoft.NET 4.6 team - here is reference, they required a code example though.

https://connect.microsoft.com/VisualStudio/feedback/details/2766461/object-reference-not-set-to-an-instance-of-an-object-system-activities-dll

STATUS DETAILS
Declined
Ideas Administrator

Thank you for submitting your idea to our ideas portal. We appreciate your contribution and the time you took to share it with us. We have shipped many enhancements since this idea was posted and it is likely that it has been resolved. If not, kindly reopen. Thank you again for your continued support.