I would like to be able to pass the ALL the data for a selected record (using the data type for the individual record) to a related action. However when I try, I get the attached message. Is there a way to do this? It is possible to pass rv!record to a record view, for example.
Discussion posts and replies are publicly visible
This is just a hint to use record type references WHEN passing individual fields. Appian will cast the record type to the data type in the process model automatically when you pass the whole record item.
It's a little silly, but as far as I've been able to tell you either have to construct the CDT manually by referencing all fields manually, OR (and slightly easier) query the CDT using the rv!identifier and an a!queryEntity call.
It's a little infuriating that the data is right there and you can reference each individual field but the entire record CDT is not made available. I know it used to be like this, I had hoped it had changed!
I personally prefer querying with the rv!identifier as a manually constructed CDT may require updating if the fields change and it's easy to forget.
Yes, querying is my preferred method as well. Another strength of this approach is that often a record type will (or at least can) be based on a specialized CDT / View that's fine-tuned just for use in the record type, but for a related action you might want to pass in the "normal" basic CDT from the table upon which the record type view is based. That would be very cumbersome to do otherwise.
Great point Mike!
Part of the reason this is not supported for related actions at this time is because you can't use the Record Data type in process models. Your 'recordFullData' is a CDT and it's better to construct the CDT or query the row rather than rely on casting directly.
If you look at Record Views, you can pass in the entire rv!record and it's encouraged!
I think the main point of frustration here is the lack of any apparent ability to directly cast between "record type" objects and objects of the matching CDT type. It seems like this should be obvious functionality yet any attempts to do so end only in frustration - it makes me avoid using "record type" data for pretty much anything where i can avoid it.
Thank you for summarizing the issue Mike. The record and CDT in the process are both the same CDT type.
Thank you all for your input, very helpful as always :).
Hi Danny, I have had trouble recently even when passing the rv!record into views. I know this is documented even and should work but I haven't had any luck doing it with newly created record types where I just want to pass the whole cdt into a summary interface