Scripting

  • 1.  I would like to post a batch from a BOI app, but n

    Posted 11-06-2017 13:23
    I would like to post a batch from a BOI app, but not having much luck. Does anyone have a sample of that to share? AP_InvoiceRegister is what I am working on but another update object would probably show me the way.


  • 2.  RE: I would like to post a batch from a BOI app, but n

    Posted 11-06-2017 13:37
    Here's some old code (~2014) for Transaction Entry (you'd need to fill the batch # into strTEBatch and accounting date into strAcctDate) Set oTransRegister = oScript.NewObject(""IM_TransactionRegister_upd"", oSession) ''Check for Batch Enabled If CBool(oTransRegister.nBatchEnabled) Then r = oTransRegister.nSelectBatch(strTEBatch) If r = 0 Then ErrorHandling(""Selecting Batch "" & strTEBatch) End If r = oTransRegister.nSetPostingDate(strAcctDate) ' to post to correct GL period - may want to check LastErrorMsg if retVal r = oTransRegister.nProcessReport(""DEFERRED"") ' could be ""PREVIEW"" or ""PRINT"" for hard copy, use .SelectPrinter(strPrinter) r = oTransRegister.nUpdateInit() r = oTransRegister.nUpdateMain() oTransRegister.DropObject() Set oTransRegister = Nothing


  • 3.  RE: I would like to post a batch from a BOI app, but n

    Posted 11-06-2017 13:39
    And here's a Batch creation sample for GL Journal Entry: (strGLBatchPrivate should be Y/N and anything goes for the strGLBatchComment) 'Check for Batch Enabled If CBool(oGLJournalEntry.nBatchEnabled) Then r = oGLJournalEntry.nSelectNewBatch(strGLBatch, strGLBatchPrivate, strGLBatchComment) End If


  • 4.  RE: I would like to post a batch from a BOI app, but n

    Posted 11-06-2017 13:41
    Aahh - .nUpdate, not .Update - Thanks @SteveIwanowski


  • 5.  RE: I would like to post a batch from a BOI app, but n

    Posted 11-06-2017 13:48
    Also to add to Steve's, the nProcessReport output can be set to ""PAPERLESS"" too. It works once you copy the Paperless section of sota.ini to pvx.ini (because BOI uses pvx.ini). I mentioned the details on another thread somewhere.


  • 6.  RE: I would like to post a batch from a BOI app, but n

    Posted 11-06-2017 13:55
    @AlnoorCassim - interesting. Is there code to check if that journal is set up for paperless? This customer doesn't use Paperless now, but hopefully this integration will get sold more than once...


  • 7.  RE: I would like to post a batch from a BOI app, but n

    Posted 11-06-2017 14:39
    Woops I totally mis-spoke there! I was relying on memory sorry. For a journal, just leave it as PRINT (not PAPERLESS) and it will figure out by itself if it's Paperless enabled and use it. For a report, you have to specify ""Paperless Office"" as the destination. But for either one you have to copy the [Paperless] section of sota.ini to pvx.ini - https://90minds-com.socialcast.com/messages/36543046


  • 8.  RE: I would like to post a batch from a BOI app, but n

    Posted 11-07-2017 05:57
    Always thought it strange that the ""n"" was added to commands. For example: rtnCompany = oSession.nSetCompany(""SC5"") rtnDate = oSession.nSetDate(""A/P"",""20140214"") rtnModule = oSession.nSetModule(""A/P"")