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 REframework version, after assigning Nothing to out_TransactionItem the above error exist, I tried removing and assigning again multiple times.So, how to fix it? please suggest

Link

Date

2025-12-20

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)

Hi @vignesh_S.M

Ensure out_TransactionItem type matches the workflow (QueueItem or DataRow) and check for Nothing before using it. Instead of assigning Nothing directly, let GetTransactionData handle it or assign a new empty object of the correct type.

Hi @vignesh_S.M ,

Try This:

Make sure out_TransactionItem has the exact same type in both Main.xaml and Get Transaction Data.xaml (QueueItem or DataRow, depending on your framework). If it still fails, delete the argument from both files, save, re-add it with the correct type, then clean and reload the project.

Thanx & Happy Automation

duplicate

also looks like you asked the same question and marked it as solved already

Hi @vignesh_S.M

Do NOT use Assign with Nothing.
instead, do one of these:

Option 1

Just remove the Assign activity completely.
REFramework automatically handles out_TransactionItem being empty.

Option 2 (If you really need to reset it)

Use Assign and type explicitly:

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

Why this happens

  • Old templates allowed Object
  • New REFramework enforces strict typing
  • Nothing alone defaults to Object, causing the conflict

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.