I added an unbound custom field to the Orders grid on the Process Shipments screen.
I want to set a value in the custom field by overriding the Orders view. I used the post from Sergey on how to do this (https://asiablog.acumatica.com/2016/06/using-pxview-in-dataview-delegate.html).
In debug I am seeing that the result set has records.
When the foreach fires, I get an exception. This is the block of code I am taken to when the error occurs. This may not really be an error, but I thought I’d show it in case it does matter.
This error on the screen:
In the graph, this is the actual line for the Orders view:
public PXFilteredProcessing<SOShipment, SOShipmentFilter> Orders;
I tried putting SOShipmentFilter in the foreach but that causes a cast error too. Sergey’s example shows the foreach containing all the DACS in the original View so I tried that too.
foreach (PXResult<SOShipment, SOShipmentFilter> row in result)
Since the result set only shows SOShipment records, it looks like my code is correct.
Any ideas?
Best answer by darylbowman
View original