Alternate Item Auto SO Line Entry

I am revisiting this topic, would scripting be an option to automatically select the first alternate item with sufficient available inventory when an item that has insufficient inventory is entered on a line?  I am trying not to give the user the option to choose if they want to use an alternate item, I what to make it automatic.  The item quantity defaults to BackOrdered if there is not enough stock available right now, not sure if this could be used as a flag?

This also jumps to another post I made about the "entry exceeds...." pop up screen.  We were able to bypass the pop up through a security event checkbox in SO.  That is why I am trying to automate the selection of the alternate item.