Summary
Currently, when working with extensions in D365 Business Central both of the following are possible:
- Sorting on a physical table's flow field
- Sorting on a temporary table's normal field
However, sorting on a temporary table's flow field is not possible.
Sorting on Temporary Table's Flow Field should be possible by extension code in D365 Business Central.
To Reproduce
- In a procedure create a temporary record
- Calculate a flow field of that record (using
CalcFields
) - Sort on that flow field (using
SetCurrentKey
)
^-- This is where the error occurs when you debug
This does not happen if the record isn't declared temporary
Example
You can find code that demonstrates this issue here: https://github.com/microsoft/AL/issues/6948
Comments
I don't understand why it was working fine in v22 and now it's not in v23
Category: Development
I have a customer for whom this was working fine in v22, but after the upgrade to v23 it is not working again.
Category: Development
it will be very helpful.Because of this, we have to use a Physical table and system performance goes down by that.
Category: Development
It will be very helpful to have Sorting on Temporary Table's Flow Field. It will resolve many of our issues.
Category: Development