How to check if a sales order has an invoice created and linked to it or not.
I do not know the context of when you are checking, but in a saved search, a sales order will have the joined transaction with an applying link type of Bill/Invoice. So you could play with creating a search to get this information.
applying link type
I want to work on user event script that on submit of a salesorder will check if the sales order has an invoice created and linked to it or not.