An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.NullReferenceException: Object reference not set to an instance of an object.
at lambda_method(Closure , ActivityContext )
at Microsoft.VisualBasic.Activities.VisualBasicValue1.Execute(CodeActivityContext context) at System.Activities.CodeActivity1.InternalExecuteInResolutionContext(CodeActivityContext context)
at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance, Activity1 expressionActivity) at System.Activities.Variable1.PopulateDefault(ActivityExecutor executor, ActivityInstance parentInstance, Location location)
at System.Activities.ActivityInstance.ResolveVariable(Variable variable, ActivityExecutor executor)
at System.Activities.ActivityInstance.ResolveVariables(ActivityExecutor executor)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Keep getting above error while trying to Run.
Have assign all variables with respective variable types. However, it didn’t help. Please help to share your experience on solving this error.
@KahPou_Liew - (Object reference not set to an instance of an object) If this error occurs the value which you have assigned is null. Even you have assigned all the variables with respective variable types if the value is null then this error will come. Try to print each variable and check whether all the values assigned are coming or not.
@KahPou_Liew - Can you please share the screen shot of your xaml. If you are not even able to run the process means initial step itself value is passing as null.
Hi
Is there any variable in variable panel set with GLOBAL SCOPE under scope field but has no value in it
If so set the respective variable to its own container and not to the whole sequence
@KahPou_Liew I meant the Screenshot of the Workflow you built the screenshot you provided tells us that every variable has the value Nothing, Hence it is giving you the error
I’ve found out the root cause is because I’d assigned a Variable as name+"@email.com" by default and set it as a receiver within “Send SMTP Mail Message”.
After I’ve deleted it and input name+"@email.com" into Receiver’s “To” field instead of variable, it works as expected.