I'm having some trouble with a Scheduled Workfow. ...
# general
a
I'm having some trouble with a Scheduled Workfow. When I have the workflow deployed in Testing mode, and click Execute Now, It's not sending any emails even though I ensured the Saved Search it filters on would resolve to exactly 1 record. Results are grouped by email address on Vendor Bill records' join field to Vendor : Email. Both The search and the workflow are owned by me. No messages get sent or recorded in NetSuite. I double checked the sender and recipient, the subject and body in the Send Email workflow action, which is set to run on Entry to the only State in the Workflow.
1
m
What is the trigger of your send email action
a
Trigger On : Entry
m
Are you in sandbox?
a
No, Production. I just send it specifically to myself.
m
Did you check the workflow logs?
a
Checking now. There are 15 Vendor Bills with that Vendor email address in the search results. I'll let you know if I find my workflow on any of the logs (it is set to keep instance and history always and to log)
The workflow doesn't appear in the Workflow History sublist on any of those vendor bills.
I also tried changing the search to be Public but that didn't seem to have any effect.
m
And enable workflow instance and history and also logging?
a
Yes on all those
m
Ok that means the workflow isn’t being initiated at all. Some criteria in your initiation is limiting these records
a
Hmm. I don't have any criteria set, except the Saved Search filter for the scheduled workflow.
I removed the Summary Type from all the result columns in the saved search, and now the workflow is working, but it's sending one email for each of all the 15 Vendor Bills, instead of one email per Vendor email address (which is what I was Grouping by before when the workflow wouldn't work).
Maybe this is a job for SuiteScript. I don't want each Vendor to get any more than one email. I don't want to send them the search results either, just a message.
The documentation says it would run on all the records, not just the summary view lines. So I may need to use a Vendor search instead of a Transaction search, even if I could get it to work on a Search that has summary columns. But then again, I don't need to include the Amount in the search columns, only in the summary criteria.
m
If you make a vendor saved search and run the workflow based on vendor record it will send 1 per vendor
1
Even if it’s a summary search
a
Thank you that works 🙂