I am using the parseDateString function in a data transform to set a property’s value, but I get this error when I run the data transform:
class “java.lang.Long” does not match mode “String” of property “RunRecordPrimaryPage.TestLong”. Details: Invalid value for aValue passed to com.pega.pegarules.data.internal.clipboard.ClipboardPropertyImpl.setValueOverride(Object)
I tried different types of properties but nothing seems to work. Can anyone help?
Hi @LouisY16949431 What is the Type of TestLong property? Did you tried with DateTime? Can you share the screenshot of this DT step to help you better ?
@LouisY16949431 Now I understood the problem. The parseDateString function is returning Long Java datatype. I believe we dont have an equivalent datatype for Pega properties apart from Text (String).
We can do simple trick to typecast from Java Long to String by using concatenation.
set .testlong to “”+@parseDateString(@addtoDate(@CurrentDateTime(),0,0,1,0))
Declare setting property as Text(String). Here ,.TestLong . It will work.