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

  • Author
    Posts
  • #6037 Score: 0

    zackb22
    • Contributions: 0
    • Level 1

    Hi,

    I am trying to email merge a nlapiOldRecord() and a nlapiGetNewRecord() in an after submit script. I currently have logic put in place that will check to see if my sales order has changed, but I am struggling to render the template with the nlapiOldRecord() values. Since it’s the same record ID, it just brings in the new values in my email. Is there a way to merge them into the template or an I going to have to build a table in the SuiteScript to get it to do what I want?

    Thanks,

    Zack
    This is a cached copy. Click here to see the original post.

  • #6038 Score: 0

    errol
    • Contributions: 0
    • Level 1

    If all you need is an email alert on the Sales Order that shows what changed, you could accomplish this with a Saved Search. On searches, there is an Email tab where you can select “SEND EMAIL ALERTS WHEN RECORDS ARE CREATED/UPDATED” then add in who you want the recipients to be below (and check Send On Update and Show Recent Changes).

    If you go this route, you could also add criteria that says “Last modified is today” to narrow the results for performance.

    -Errol

  • #6039 Score: 0

    zackb22
    • Contributions: 0
    • Level 1

    Originally posted by errol

    View Post

    If all you need is an email alert on the Sales Order that shows what changed, you could accomplish this with a Saved Search. On searches, there is an Email tab where you can select “SEND EMAIL ALERTS WHEN RECORDS ARE CREATED/UPDATED” then add in who you want the recipients to be below (and check Send On Update and Show Recent Changes).

    If you go this route, you could also add criteria that says “Last modified is today” to narrow the results for performance.

    -Errol

    Hi Errol,

    Thank you for the suggestion. I may have been overthinking it. I will try it this way, but I would rather it not send when records are created, only updated.

    Thanks!

    Zack

  • #6040 Score: 0

    zackb22
    • Contributions: 0
    • Level 1

    As a follow up to this, I just tried it in a search and it is only pulling system note changes, not item changes. I need to see what items were added or removed from the order.

    Thanks,

    Zack

You must be logged in to reply to this topic.