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.
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/424b33ac-84ea-4237-9c3b-f27a1a2949f1.png)
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.
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/895f2a92-0d24-46ca-9347-21d1c42706ed.png)
This error on the screen:
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/a7c6ca2a-5a6c-4136-86b1-a7ffd16bfe63.png)
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