BOI script to update the Sales Journal

Hi Forum,

I am automating Sales Order Invoices import from an external source.  

I got that working (we are in test mode), now i am trying to write a script to Update the Sales Journal via script.

Has anybody done something like this?.. i cannot find anything on the forum on it.

First of all, is it possible to do this task in a BOI script?

Any suggestions will be greatly appreciated.

Regards,

Manuel Roman

Parents
  • Manuel,

    Yes, that is possible. Below is the code that I use in PowerShell for the AP Invoice Register. But you can easily transform this for VBScript or C# and change the objects to the ones for SO.

    $retVal = $oSS.nSetProgram($oSS.nLookupTask("AP_InvoiceRegister_ui")) 
    $oAPInvReg = $oScript.NewObject("AP_InvoiceRegister_upd",  [ref]$oSS)
    # .nBatchEnabled to test if Batch Processing is activated
    $retVal = $oAPInvReg.nSelectBatch("12345")
    if ($retVal -eq 1)
    {
        $retVal = $oAPInvReg.nPDFSilent = 1
        $retVal = $oAPInvReg.nSetPostingDate("$sModuleDate")
        $retVal = $oAPInvReg.nProcessReport("PRINT") #DEFERRED
        $retVal = $oAPInvReg.nEndOfPDFConverterJob()
        $retVal = $oAPInvReg.nUpdate()
    }

  • in reply to BillyVanilli

    Hi Billy,

    Thanks a bunch, i'll give it a try in PowerShell first,

    I'll change the object to the SO Object.

    Thanks again...

    Regards,

    Manuel

  • in reply to mroman

    I have several examples on here about journals.  Also pretty sure one of them addresses using Paperless Office with it as well so they don't go to DEFERRED printing but actually hit Paperless Office.

  • in reply to David Speck

    Hi David,

    Where ?

    Regards,

Reply Children