How to fix this error 'Cannot assign from type 'System.Object' to type 'System.Data.DataRow' in Assign activity 'Assign'. is coming in REframework latest template version 2025.10.1?

Description

I am using 25.10.1 version of RE framework template, after assigning Nothing to out_TransactionItem the error "Cannot assign from type ‘System.Object’ to type ‘System.Data.DataRow’ in Assign activity ‘Assign’ "is coming up,I tried removing and assigning again multiple times. But error still exist.please suggest on how to resolve the error.

Link

Date

2025-12-19

Related UiPath products

Studio

Hi,

You can try this,

In REFramework 25.10.1, Nothing is treated as System.Object, so assigning it to a DataRow causes the error.

Use a typed Nothing in the Assign activity:

out_TransactionItem = CType(Nothing, System.Data.DataRow)

@vignesh_S.M

try to use multi assign instead of assign and check mostly that should resolve it

cheers

Hi @vignesh_S.M ,
It seems the problem has not fixed yet.
As workaround, can you try to replace the Assign with Multiple Assign as the following?

Workaround :slight_smile:
keep out_TransactionItem as Object, assign Nothing, and cast it to DataRow only where it is used in Process.xaml.