When I test my Scheduled Workflow with the Execute...
# general
a
When I test my Scheduled Workflow with the Execute Now button, it doesn't show up in the target record's Workflow History or Active Workflows at all, even though I enabled Logging and workflow history Always, and Release mode is Testing, and the Saved Search the Workflow itself is based on has only the exact record I want to test in its search results (so that should overcome the problem where only the first 20 results get the workflow run on them for Testing mode, right?). I can't develop this workflow if I can't test it. Does anyone know of anything else I could check to find out why I can't see any workflow history logs? I think it's just not running, but I don't yet see why. It also didn't run when I set it to Released and scheduled it for a later time.
a
Sounds like it's not triggering for the first 20 results of your search. Check your criteria and the context
I would narrow my search to one record, and play with that
a
I have already done that and my search has 1 result.
a
good start. Context and Criteria?
a
All actions and Action Groups are done in the first State and they occur on Entry. The same Saved Search is the Workflow-level criteria which I believe determines the set of records (up to 20 in testing mode, I think) which the workflow will run on (only 1 now with the extra testing filter). It is not inactivated. Not sure how you mean about Context. It's a scheduled workflow....
I haven't mentioned the criteria on the Actions because when the Workflow runs, it shows up in the workflow history of the record it runs on, and within that history entry, all the actions for every state reached show up whether they met the criteria and ran or not.
I'll be back tomorrow. Thanks for the help so far. I'm just not sure what else to check...
m
Is this in sandbox
Also what are all the conditions on the main workflow. If no logs show up usually it means the WF was not initiated for that record. Do you have other conditions set in the workflow besides the saved search?
a
Nope, just the saved search. Scheduled Workflows don't let you add other conditions beyond the saved search, it seems.
m
Can you send a screenshot of the Workflow configuration?
a
image.png,image.png,image.png
a
and your workflow action?
a
There are several actions and an action group, and they all used to show up in the Workflow History when I ran tests. The first few actions have no Conditions set. The Action Group has no Conditions either. The first Action within the Action Group looks like this. There is an invalid field reference, but it used to make an error appear in the Workflow History for this workflow, and now nothing for the workflow appears:
Next Action:
Then there's 3 actions that are currently inactivated in that same Action Group. That's all for the Action Group, then there's one more Action outside the Action Group:
If I change it to Event triggered instead of Scheduled workflow, then I can choose an Execution Context. It's currently on All execution contexts, but I am keeping it as a Scheduled workflow, so I think it doesn't care. The Actions and Action Group are all on the default set of execution contexts (everything selected except Web Store-related stuff and OCR).
In case something other than conditions/search, context, and similar could prevent the workflow from running at all, I'm going to try putting it back to the way it was when it worked and incrementally modify it from there if it still can be tested after doing so.
Got it working again. Not sure how but starting over seemed to help!