Any chance you are executing the script on a version of sage 100 that requires the exe.config files for Crystal Reports compatibility? Think it was version 2017+, maybe 2018+.
If yes, you need to copy the pvxwin32.exe.config from MAS90\Home into the directory where pvxcom.exe is located on the workstation executing the script (should be C:\Program Files (x86)\Common Files\Sage\Common Components or C:\Program Files\Common Files\Sage\Common Components) and rename it from pvxwin32.exe.config to pvxcom.exe.config.
Also, if you are going to be dealing with paperless, make sure the [Paperless] section is copied from the sota.ini file to the sotachr.ini, sotapgm.ini, and pvx.ini files in MAS90\Launcher on the server, i don't think it is needed on the workstation in the case of advanced but i'm not positive.
------------------------------
David Speck II
Tennessee Software Solutions
------------------------------
Original Message:
Sent: 10-29-2019 14:03
From: Phil McIntosh
Subject: BOI GL posting issue
@Steve Iwanowski Thanks!
That got me to the real error which was ":Crystal" which probably means IT didn't install workstation setup by right clicking and run as admin...
------------------------------
Phil McIntosh
President
Friendly Systems, Inc.
Asheville NC
678.273.4010 ext 5
------------------------------
Original Message:
Sent: 10-29-2019 12:08
From: Steve Iwanowski
Subject: BOI GL posting issue
I've used similar code without the CBool, so maybe try without that? I have no idea why that would matter...
Here's one of my snippets :
'Update GL General Journal Register Set oGLJournalUpdate = oScript.NewObject("GL_GeneralJournal_upd", oSession)If CBool(oGLJournalUpdate.nBatchEnabled) Then r = oGLJournalUpdate.nSelectBatch(strGLBatch) If r = 0 Then oGLJournalUpdate("Selecting GL Update Batch " & strGLBatch)End Ifr = oGLJournalUpdate.nSetPostingDate(strAcctDate) If r = 0 Then oGJRrrorHandling("Setting General Journal Register Date")r = oGLJournalUpdate.nValidatePrinter(strPrinterName)If r = 0 Then oGJRrrorHandling("Setting Printer to " & strPrinterName)r = oGLJournalUpdate.nProcessReport("DEFERRED") ' could be "PREVIEW" or "PRINT" for hard copy, use .SelectPrinter(strPrinter)If r = 0 Then oGJRrrorHandling("Printing General Journal Register to \\APPS\Paperless$")r = oGLJournalUpdate.nUpdateInit()If r = 0 Then oGJRrrorHandling("Update Initing General Journal Register")r = oGLJournalUpdate.nUpdateMain()If r = 0 Then oGJRrrorHandling("Update Maining General Journal Register")oGLJournalUpdate.DropObject()Set oGLJournalUpdate = NothingobjFile.WriteLine "Successfully Updated GL General Journal Entry " & strSourceJournal & "-" & strJournalNo
------------------------------
Steve Iwanowski, NextStep Technology Advisors, aka DSD Lancaster PA ¯\_(ツ)_/¯
Original Message:
Sent: 10-25-2019 09:11
From: Phil McIntosh
Subject: BOI GL posting issue
I had not done the SetPostingDate, but adding it in has made no difference...
------------------------------
Phil McIntosh
President
Friendly Systems, Inc.
Asheville NC
678.273.4010 ext 5
Original Message:
Sent: 10-25-2019 02:34
From: David Speck II
Subject: BOI GL posting issue
just a few thoughts;
Are you setting the module date to a date that is valid before getting the GL Journal Upd object?
Are you setting the posting date of the Upd object via the SetPostingDate method and checking the retval (this should happen before calling ProcessReport)?
------------------------------
David Speck II
Tennessee Software Solutions