This topic contains 3 replies, has 0 voices, and was last updated by chanarbon 7 years, 7 months ago.

  • Author
    Posts
  • #21916

    Jordan Manningham

    Hi All,

    I've got a relatively simple project though I'm not sure whats the best practice for executing it. We want a checkbox on transaction records that becomes checked when a user prints the record. I couldn't do this with a workflow and I don't think I can add event listeners to the default print action – Which leads me to think I should create a custom button "Print Transaction" that can check the checkbox and calls the default print action. I would also have to hide the default print action to ensure the custom button will always trigger it. I'm thinking that I need to create a user event script to create the button and a client script that calls a suitelet on click. The suitelet would mark the checkbox as T and make the html call to print the transaction. I'm not sure how to make the html call though.

    Does this sound like the right approach?
    This is a cached copy. Click here to see the original post.

  • #21917

    dmashburn3

    I do this for custom print jobs on custom records. Looks like you could probably get away with using the nlapiPrintRecord()

    At the end of your suitelet, you could call something like this perhaps?

    Code:
    var file = nlapiPrintRecord(type , id , format , properties );
    response.write( file.getValue() );

  • #21918

    Mark Derrick

    Take a look at this SA article about logging when a transaction is printed.

    https://netsuite.custhelp.com/app/an…24776/kw/24776

    You can set a Workflow Event Type to Print, and let a script do the rest.

  • #21919

    chanarbon

    Similar to Mark Derrick, User Event Script also has a type = print functionality which can be found in SuiteCloud (Customization, Scripting, and Web Services) > SuiteScript 1.0 > Understanding SuiteScript Script Types > User Event Scripts > User Event Script Execution Types in Help

You must be logged in to reply to this topic.