I am trying to use a UE script to call up a saved search, add new filters based on the transaction that was just saved, and then email those results. The format for the email should be just the same as (or similar to) the way it looks when you email search results directly from the UI and select the 'Send Within Message' option. Is there an easy way to do this? I think I have the code far enough that it is returning the nlobjSearchResultSet that contains the info. Don't know if I have to convert that into some HTML string or use the mail merge for nlapiSendEmail.
I might be making this more complicated than it needs to be. End goal is this: When a purchase order due date is changed, the user changing that due date can check a box on the PO that, upon save, will send an automated email that contains the list of all sales orders containing items that are on back order from that purchase order. I have the saved search created and up to this point we are just manually editing the search filter to include certain items, then emailing the results manually from the search results page. Open to any tips on how we might accomplish this, thanks in advance.