You're lucky! If you believed that your code worked and shipped it, you would break your customers ERP system! You must be more careful.
There already is standard logic to decide whether a confirmation can be posted, which your completely ignore. If you managed to overwrite the value, you'd have break the standard logic. Also, if you want to prevent confirmation posting, you need to take all the related buttons into account. All the button will be handled if you do it at the right place: SalesTableType.canConfirmationBeUpdated(). What you should have done is considering that standard logic may exist (if you don't already know that the buttons are disabled in some case, which proves that some logic must exist). Then you should have used Find references to find the place and analyze code further to find the right place to extend.
Your handling of LineStripNew is wrong too. I'm assuming that you want to prevent line creation, but you didn't. You disabled a button but users can still use keyboard shortcuts. The correct approach is using allowCreate() of salesLine_ds.
Also, the while select makes no sense, because only values from the last record will be used. Loading all the previous records is a waste of resources. If there are more records in DTSalesTransactionAccess for a single user, add condition to your code to decide which one to use.
You can throw away your select of userInfo and the salesLine variable.
If accessing the button was the correct thing to do, you could greatly simplify your code by using element object to access the form. Then you can use, for example, element.buttonUpdateConfirm to access the confirmation button.