This function is an event handler that is called every time a dialog for a BOM with the specified ID is finished.