This topic contains 5 replies, has 0 voices, and was last updated by mistryr3 9 years, 11 months ago.

  • Author
    Posts
  • #10133

    mistryr3

    Hi,

    Currently when the ‘to be e-mailed’ box on a sales order is checked, when it is saved it is immediately emailed to the email address on the sales order. A client wants to be able to mark the sales orders that are ready to be emailed to customers and then send all of these marked sales orders to customers at the end of the day.

    At the moment i have tried to resolve this issue by adding the following custom fields to a sales order: ‘to be e-mailed’ and ‘e-mailed’. When the client has finished creating a sales order they will check the ‘to be e-mailed’ box. I then created a workflow with the following states:

    – State 1 (type: send email):

    – I tried to configure this to send the sales orders where the ‘to be e-mailed’ box was checked. I did this by basing the action on a saved search. Note the trigger for this first state is 6pm each day

    – State 2 (type: set field value):

    – I tried to configure this to uncheck the ‘to be e-mailed’ box on the sales orders that had just been sent to customers

    – State 3 (type: set field value):

    – I tried to configure this to check the ‘e-mailed’ box on the sales orders that had just been sent to customers so they would no longer be included in the saved search

    Any help with this would be great. I’ve only been using NetSuite for 1 month now, so i may have gone about this the wrong way!

    Thanks.

    Kind regards,

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

  • #10134

    ggodbout

    Hi Ricky,

    There is a couple of ways to accomplish what your client requested, and the solution that you imagined is one of those.

    Based on the details that you provided, I can tell that you are very close to make it work. Here are a few things to double-check that should help you to complete the job:

    First, the Workflow (WF) Summary

    This is where you want to define WHAT triggers your WF or, in your case, WHEN it is triggered.

    I am sure you did not have any problem to pick the right Record Type and Sub Type, otherwise you would not have been able to select your saved search.

    However, it is also in the summary that you will set the Saved Search to use, the Execution Time and the Recurrence, not in the states.

    Second, the WF State

    After setting up the WF Summary properly, your workflow should be triggered, on schedule, and start by running the saved search.

    Then, it will enter the Start State automatically and try to execute any action that you have specified.

    The WF can execute many actions one after the other. Therefore, you could use only one State, with 3 actions, all TRIGGER ON = Entry:Send Email

    Specify the Sender, Recipient and Content, where Recipient will be FROM FIELD.

    Since your WF is running on Sales Order, you want to get the email from the customer specified on the sales order. Therefore, you can pick RECORD = Current Record and FIELD = Email (or also Customer > E-mail).
    Set Field Value

    To uncheck the To Be Emailed box…
    Set Field Value

    To check the Emailed box…
    After executing the actions for the first sales order, then your workflow will re-execute the actions for the next sales order returned by your search.

    Make sure that your saved search, which is used in the summary, returns only the Internal IDs (of the orders marked To Be Emailed), and everything should be good to go.

    Finally, after executing all the actions for every sales order, then your workflow will exit and will wait to be re-triggered, as per scheduled.

    Let us know if it works.

  • #10135

    mistryr3

    Hi Guillaume,

    Thanks for getting back to me.

    I have made the changes you’ve recommended, however i still haven’t managed to get it to work. The workflow log of one of the sales orders with the ‘needs to be emailed’ box checked shows that when the workflow is trying to send the emails to the customers, an error occurs. The error states ‘the author internal id or email must match an employee’. I have looked into this, however i can’t work out why this is occurring. I’ve spent hours on this today!

    Any help with this would be great.

    Thanks for your help, i appreciate it.

    Kind regards,

    Ricky

  • #10136

    rnedelkow

    That error is documented in SuiteAnswers Answer Id: 24972. Two likely causes are that the ‘Send Email’ action is referencing an empty employee field for use as the email sender, or the workflow is using the current user as the sender and the workflow is being initiated by a script.

  • #10137

    mistryr3

    Hi Robert,

    Thanks for getting back to me.

    Kind regards,

    Ricky Mistry

  • #10138

    mistryr3

    Hi Guillaume,

    I followed your instructions and i was unfortunately not able to get the email to send.

    One of the options put forward to the client involves using the standard ‘to be e-mailed’ box on a sales order/invoice. As you will know, this can be checked by default if on the relevant customer record the ‘send transactions via email’ box is checked. This will mean that if the user wants to save and return to a sales order/invoice later they will have to uncheck the ‘to be e-mailed’ box.

    Another option put forward includes using script to automatically check the ‘to be e-mailed’ box on an invoice if on the customer record the ‘send transactions via email’ box is checked. This will mean that a sales order can be saved without it being sent to the customer.

    Kind regards,

    Ricky Mistry

You must be logged in to reply to this topic.