The below error comes when working with visual studio 2015 workflow for SharePoint online sites. The workflow we were developing for SharePoint online site using visual studio 2015 and we were attaching it to a SharePoint list which was there in the host web.
The error comes as:
Failed to translate expression <variable name> because of the following error:
Cannot cast LValue expression to type 'Microsoft.Activities.DynamicValue'
See pics below for the error message.
Here in this workflow we have used one variable as string type like below:
We have used this variable in calling in the rest api in HttpSend activitity. The error was coming because in the HttpSend it was expecting a variable of type Microsoft.Activities.DynamicValue<T>.
So to resolve the issue, change the data type of the variable from String to Microsoft.Activities.DynamicValue<T> like below:
The error comes as:
Failed to translate expression <variable name> because of the following error:
Cannot cast LValue expression to type 'Microsoft.Activities.DynamicValue'
See pics below for the error message.
Here in this workflow we have used one variable as string type like below:
We have used this variable in calling in the rest api in HttpSend activitity. The error was coming because in the HttpSend it was expecting a variable of type Microsoft.Activities.DynamicValue<T>.
So to resolve the issue, change the data type of the variable from String to Microsoft.Activities.DynamicValue<T> like below:
This might solve your issue too.
0 on: "SharePoint online visual studio 2015 workflow Error Cannot cast LValue expression to type Microsoft.Activities.DynamicValue"