"Can someone help create a saved search to retriev...
# suitescript
a
"Can someone help create a saved search to retrieve matrix child item price levels based on the matrix parent item?"
r
I can help with a query. Don't prefer saved searches for these task.
a
Please can you help me with the Query.
r
Use this query on any kit item, you will get all its component and the price for the price level 1. replace i.id with the internalid for the kit and pricelevel based on your needs.
Copy code
SELECT 
i.id AS item_internal_id,
i.itemid AS item_name,
p.unitprice AS item_price,
im.item AS component_item_internal_id,
ki.itemid AS component_item_name,
im.quantity AS component_item_quantity ,
kp.unitprice AS component_item_price 
FROM 
item as i
LEFT JOIN pricing AS p ON p.item = i.id
LEFT JOIN itemmember AS im ON im.parentitem = i.id
LEFT JOIN item as ki ON ki.id = im.item
LEFT JOIN pricing AS kp ON kp.item = im.item
WHERE
i.id = '65743'
AND i.itemtype = 'Kit'
AND p.pricelevel = '1'
AND kp.pricelevel = '1'