Skip to main content

Hello community. Working through a customization project and I am having issues locating an SO using a search in a custom processing screen. In my code below my primary DAC is SOLine. I am using values from there in a foreach statement to then load the SO in an SOOrderEntry graph. However, it is not returning the SO record. Is there a better way to go about this code? The code returns “Object reference not set to an instance of an object” on the final line below when testing.  

Thanks,

Adam

This one catches us all.

One option is to use FK.Find to locate the order. The other option to continue to use search means that you need to set up your search very slightly differently.

The thread, below, outlines what @darylbowman documented when trying to sort this out. There’s comment in the thread that gives the reason why.

 


Easiest way to use Search<> is to search the source code for the same use-case (same entity), because they differ depending upon how the Data View is written.


@Django Perfect thanks! Learning a ton with the community's help. Greatly appreciated! 


Reply