You can use the debug window (ctrl shift & d) to display the queries happening behind the scenes. In this case there’s a view called NCR_OBJECT_CONNECTION_DETAIL which supplies the values to that window. I took a quick look at my system, and found that it’s not just inventory parts that can end up here, but purchase orders, RMA’s etc. Trying to create a custom field could be tricky on such a moving target, and you’d probably need a few case statements to allow for the different types...
You can right click the object line, and select “object details” which will take you to the associaated object if that helps.
Hello, we find the solution how get keys from the object connection. For example i want get PART_NO from the object connection key by get_key funcion.
Client_SYS.Get_Key_Reference_Value(x.key_ref, 'PART_NO')
and there is example of my select depanding on the type of the connected LU_NAME.
select case
when x.lu_name = 'InventoryPart' then
Client_SYS.Get_Key_Reference_Value(x.key_ref, 'PART_NO')
when x.lu_name = 'ReceiptInfo' then
RECEIPT_INFO_API.Get_Source_Part_No(Client_SYS.Get_Key_Reference_Value(x.key_ref,
'RECEIPT_SEQUENCE'))
when x.lu_name = 'ShopOrd' then
SHOP_ORD_API.Get_part_no(Client_SYS.Get_Key_Reference_Value(x.key_ref,
'ORDER_NO'),
Client_SYS.Get_Key_Reference_Value(x.key_ref,
'RELEASE_NO'),
Client_SYS.Get_Key_Reference_Value(x.key_ref,
'SEQUENCE_NO'))
when x.lu_name = 'ShopMaterialAlloc' then
SHOP_ORD_API.Get_part_no(Client_SYS.Get_Key_Reference_Value(x.key_ref,
'ORDER_NO'),
Client_SYS.Get_Key_Reference_Value(x.key_ref,
'RELEASE_NO'),
Client_SYS.Get_Key_Reference_Value(x.key_ref,
'SEQUENCE_NO'),
Client_SYS.Get_Key_Reference_Value(x.key_ref,
'LINE_ITEM_NO'))
end
from NCR_OBJECT_CONNECTION_DETAIL x
where x.ncr_no = :NCR_NO