Hi,
I am getting cast invalid error when I am trying to store a value in my cdt field which refers as foreign key.
The scenario is I am passing the product name as parameter and fetching all the details of that product using expression rules.
Now the product id I want to store in another cdt then it is showing cast invalid error.
Please help me to resolve this error.
Thanks,
Discussion posts and replies are publicly visible
Sure. More details please. How do the CDTs look like? Which data type is the rule input? The error is triggered by the button?
this is my CDTs.
The a!save seems to try to store the product id, which is a string, into a field which is of a CDT type. This is what the error message says and what I see from looking at the CDT.
Yes that is the thing I want to implement to store product id so I can give foreign key concept so I'll be able
to fetch all the fields of itemDetails CDT.
OK. If you want to store the structure I suggest to do just that. That would change line 49
value: local!pid.productId
to
value: local!pid
Thanks Stefan Helzle
I have made changes now it is working fine.