IM_Itemwarehouse Message box

Trying to figure out how to get a message box to pop up in SO entry when a user enters a line for warehouse '000' for example, however there is 0 available for that item in warehouse '000'.  On that same item we have 2 available in warehouse '001', I would like a message box to show saying that inventory is available in this other warehouse.  I know SAGE has a native function (pretty sure) for this, but we had to turn it off for other reasons.  I started the script but getting kind of lost once I need to look in other warehouses.  Trying to attach but not letting me.