BOI UPD Object - Paperless Office

SOLVED

Has anyone ever successfully created a paperless office pdf when printing/updating a Sage register/journal via BOI?  I believe the documentation says to set the journal object's 'destination' property to 'PAPERLESS'.  While I'm able to post the register, despite my repeated attempts, I'm unable to generate the pdf in paperless.  The upd object's 'print journal' method is successful with 'PAPERLESS' being specified as the destination, but no pdf in paperless viewer, no pdf in the configured pdf directory.  Would be interested to hear if anyone got this to work and/or if they knew of any special tricks that are necessary. (I actually posted about this some time ago - based on the lack of responses to that post I'm guess no one has done this, but I thought I'd throw it out there again).  Thanks.

Parents
  • 0
    SUGGESTED

    Greetings,

    Just recently we helped a Partner with a similar issue.  Here is an excerpt of some sample code that will print a specific from setting to paperless.  Requires that Paperless Office be setup for forms in Sage 100.  I have not tested this for printing journals to paperless but I expect the logic would be similar for any paperless document.

     

    taskID = oSS.nLookupTask("AR_StatementPrinting_UI")
    retVal = oSS.nSetProgram(taskID)
    Set oARStatement = oScript.NewObject("AR_StatementPrinting_rpt", oSS)
    CurrentRptSetting = "TEST"  
    retval = oARStatement.nSelectReportSetting(CurrentRptSetting)

    'Set EmailSelected property to true
    oARStatement.nEmailSelected = 1

    Set oPaperless = oARStatement.ocoPLCommon
    oPaperless.sFormPrintUISelection = "2"

    ' Set Email Engine EESilent property to true
    oARStatement.oEmailEngineObj.nEESilent = 1

    ' Set Electronic Delivery.  Third argument is the email engine object handle for the from object. 
    ' Seventh argument is set to true to force no UI when processing
    retval = oPaperless.nElectronicDelivery("",0,oARStatement.oEmailEngineObj,0, "","",1)

    retVal = oARStatement.nProcessReport("PRINT")

    Thank you,

    Kent

  • 0 in reply to Kent Mackall

    Thanks so much for this example Kent.  I'll give it a try!

  • 0 in reply to Justin K

    With Journal/Register tasks that are setup for Paperless Office, there shouldn't be too much required.

    After the LookupTask() and SetProgram() instantiate the _UPD class of the task.  There is a property PDFSilent that you want to set to a value of 1 and then just do ProcessReport( "PRINT" ).  PDFSilent will bypass the prompt to PDF if that is setup and bypass the automatic display of the PDF when printing is completed.

    Using A/R Sales Journal as an example:

    taskID = oSS.nLookupTask( "AR_SalesJournal_UI" )

    retVal = oSS.nSetProgram( taskID )

    Set oUpdate = oScript.NewObject( "AR_SalesJournal_UPD", oSS )

    oUpdate.PDFSilent = 1

    retVal = oUpdate.nProcessReport( "PRINT" )

  • 0 in reply to Steve Passmore

    Thank you as well Steve!  Hoping to give this another go shortly.  Will reply with results.

  • 0 in reply to Steve Passmore

    HI Steve,

    Thanks again for the example.  Unfortunately upon calling nProcessReport, the upd object is returning 'Unable to initialize PDF converter' (an error I'm all too familiar with).  I confirmed that my I'm able to generate the paperless PDF without issue for the same batch from the front end of Sage.  I was running my test using DCOM so thought maybe that had something to do with it, but that gave me the same result :(.  I'm going to perform every recommended resolution for this error from KB 35032 - but just wanted to see if you are aware of any other paperless office related configuration that is required in order to get this to work?  Thanks.

Reply
  • 0 in reply to Steve Passmore

    HI Steve,

    Thanks again for the example.  Unfortunately upon calling nProcessReport, the upd object is returning 'Unable to initialize PDF converter' (an error I'm all too familiar with).  I confirmed that my I'm able to generate the paperless PDF without issue for the same batch from the front end of Sage.  I was running my test using DCOM so thought maybe that had something to do with it, but that gave me the same result :(.  I'm going to perform every recommended resolution for this error from KB 35032 - but just wanted to see if you are aware of any other paperless office related configuration that is required in order to get this to work?  Thanks.

Children