Trying to set PO ROG batch as "Private" through scripting

SOLVED

Hey all,


I'm having a fun time trying to do a seemingly easy task.  We have a customer that would like to set all their PO batches to be private when they are entered, even when they are not selected to be when they are created.

I figured I could set a flag or edit the Entry Batch screen to force that through Custom office, but it turns out that's a Library Master screen and I cannot edit it.  Bummer.

So, I assume my only choice would be through scripting, which I'm not good at but with which I'm willing to tinker.

I thought I could create a script to post-validate on the PO number since the batch number would have been entered by then.
This is that I have

nBatch = 0
retVal = 0
oBatch = 0

retVal = oBusObj.GetValue("BatchNo$",nBatch)

Set oSS = oScript.NewObject("SY_Session")
Set oScript = CreateObject("ProvideX.Script")
Set oBatch = oScript.NewObject("SY_BatchManager_bus", oSS, "P/O", "01", nBatch)

retVal = oBatch.nSetKeyValue("BatchNo$",nBatch)
if retVal = 0 Then
MsgBox (oBatch.sLastErrorMsg)
else
retVal = oBusObj.SetValue("PrivateBatch$","N")

End if

However, I get an error 88 invalid/unknown property name.  Object doesn't support this property or method: 'oScript.NewObject"
I'm sure I'm royally messing it up but hoping someone may shed some light on this.

Also, I'm not married to this idea if there is another way of going about this.

Thanks in advance