Skip to main content
Question

Sub Inquiry Error: Object reference not set to an instance of an object


Forum|alt.badge.img

Hi! I am merging two Generic Inquiries together to achieve the following:

If the item on shipment is a kit item, display the component items of that kit, and the vendor inventory item of that component item. If the item on shipments is not a kit, then display it as is. 

Issue:

While everything is pulling in and displaying correctly. I am unable to drill into the item if it is a kit, and unable to drill into its related component items. When I click on them, I would expect it to take me to the stock item screen, however, it gives me the error: Object reference not set to an instance of an object.

If the item on shipment is not a kit item, I am able to click on the item and it does take me to the stock item screen.

 

Any suggestions on what maybe causing this issue and where I should look at?

Attached below Shipment Detail is the main GI.

 

lauraj46
Captain II
Forum|alt.badge.img+8
  • Captain II
  • April 3, 2025

Hi ​@jzhu ,

Have you explicitly defined the navigation for the InventoryCD field in the GI?  (I tried to load your GIs to review, but ran into a conflict with an existing GI in my demo environment.)

https://help.acumatica.com/(W(323))/Wiki/ShowWiki.aspx?pageid=30994ae2-7c9b-4814-b4e7-86e1ab49c51a

If the preferred navigation is a drill down then you could add the screen(s) on the Navigation tab of the GI and override the default navigation for the InventoryCD and/or other fields on the Results tab.  I don't believe you can define a conditional navigation, so you may need two result columns to achieve the desired results.

If using a side panel, you can define multiple side panels options for the same row (on the Navigation tab), and make them conditionally visible based on some criteria (such as IsKit). 

Hope this helps!

Laura 


Forum|alt.badge.img
  • Semi-Pro II
  • April 3, 2025

Hi ​@lauraj46 I have tried using the navigation screen instead of default navigation and it still does not work. I also just noticed that it’s not just the item that you can’t drill into, I can’t drill into the shipment nbr, or use the parameter filter without getting the same error. 

Here is how I joined my sub GI:

Here is my relations on that sub GI:

 


lauraj46
Captain II
Forum|alt.badge.img+8
  • Captain II
  • April 3, 2025

Hi ​@jzhu ,

I’m not sure why the navigation isn’t working, but it may be related to joining multiple GIs. 

Unless you need to see the components in the results on the main GI, you shouldn’t need to add the secondary GI as a Data Source.  You can instead add the Kit Component Item screen on the Navigation tab.  Choose side panel if that’s how you want to display it, or choose one of the other navigation options and override the default navigation on one of the result fields.  Make sure to pass the parent inventory id as the parameter. 

Hope this helps!

Laura


Forum|alt.badge.img
  • Semi-Pro II
  • April 3, 2025

Hi ​@lauraj46 I do need to display the component item and the vendor inventory id of the component item in the result, having the secondary GI is the only way I could think of that got me those fields. 

Can you explain what you mean by passing the parent inventory id as the parameter? 


lauraj46
Captain II
Forum|alt.badge.img+8
  • Captain II
  • April 3, 2025

Hi ​@jzhu ,

Instead of using the secondary GI, you might consider simply joining the necessary tables that you needs, such as INKitSpecStkDet, directly.  

By parent inventory id, I was referring to the Navigation parameters.  That is if you opt to display the sub GI detail in a Side Panel.  In that case, you would want to filter the sub GI based on the kit inventory id of the row that is selected.

Hope this helps!

Laura


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings