Currently on UiPath 2020.10 which has a bug with Invoke Code.
I have code which currently uses the invoke code activity to convert the date format from the "Effective Date” column from "MM/dd/yyyy” to “yyyy-MM-dd 00:mm:ss”.
can anyone suggest an alternative to invoke code or a for each loop? The table is large.
In such scenario I used to use SetField method: CleanTable.AsEnumerable().ToList().ForEach(Sub(row) row.SetField("Effective Date", DateTime.ParseExact(row("Effective Date").ToString,"MM/dd/yyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("yyyy-MM-dd 00:mm:ss"))
Can you try to downgrade UiPath.System.Activities package to 20.10.x or lower if you use 21.10 or above? Because InvokeCode activity in System.Activities package 21.10 doesn’t support Studio 20.10 or lower. Please see the following known issues.