oSession.UserName object required

SOLVED

Hello,

We have a customer using our button for a form in Sage 100. We are on 2020 advanced, with script for button to execute on the server. The username:

oSession.UserName

worked but now it is throwing an error, nothing seems to have changed as we know. Does anyone know why this would start producing errors, when it worked before? I believe something environmental since the code is pretty standard. Any help would be appreciated. It seems to be null now, and it throws an object required error.

thank you