Post

2 followers Follow
0
Avatar

Trigger a Custom Action from a Scheduled Workflow Rule?

Is it possible to trigger a Custom Action from a Scheduled Workflow Rule?

I have a series of SWFRs that run each month that create a Milestone with sub-tasks. There is another task-level WFR that runs when those sub-tasks are created that sets the $Duration field on the tasks based on a formula. When the SWFR runs, that $Duration field is not calculated/populated correctly. When I run the exact same thing from a CA, it is correct. I don't know if it's a timing issue or what is going on, but I know that the CA method works great. That is why I would like to know if I can trigger a CA from a SWFR.

Thank you!

Doug Smith Answered

Please sign in to leave a comment.

9 comments

0
Avatar

You can't trigger a CA from a SWFR, but there should be a way to tweak the rule so that $Duration updates correctly if it works in a Custom Action. It could be an order of operations issue that might be resolved with a secondary SWFR.

Josh Santos 0 votes
Comment actions Permalink
0
Avatar

Hi Josh,

Yes, it feels just like an "order of operations" issue. Can a secondary SWFR be triggered from a primary SWFR? Any other suggestions along those lines?

Doug Smith 0 votes
Comment actions Permalink
0
Avatar

Sort of, you can schedule a SWFR to run an hour later. One other trick is you can also end a SWFR with an action that sends an interact email, allowing you to trigger more actions a few minutes after the SWFR.

Josh Santos 0 votes
Comment actions Permalink
0
Avatar

An "interact email?" I haven't heard that term before. Does that mean a human would have to click a link in the email to trigger the action?

I definitely think this is an "order of operations" issue. I think we are SO close to finally getting this figured out, so if you can think of any other ways to make sure everything is firing in the desired order, I'm all ears.

Doug Smith 0 votes
Comment actions Permalink
0
Avatar

Ok, I will check that out. Also, what does the checkbox labeled "Allow this workflow to trigger additional workflows" mean exactly? If I could actually get the workflows to trigger another workflow, that might also work. I haven't been able to find any documentation on that.

Doug Smith 0 votes
Comment actions Permalink
0
Avatar

I forgot about this setting, this does let you chain workflow rules but may lead to slower performance. Most workflow rules require a direct change to run (ex: user updates a field), but this setting allows an indirect changes to trigger additional rules at the expense of performance. It can't trigger a custom action, but you can get the same effect from a workflow rule that has the same actions as the CA.

Josh Santos 0 votes
Comment actions Permalink
0
Avatar

I would like to at least test this. How do you actually trigger additional rules? I don't see an obvious way to do it from the options available in the "Set Actions" drop down. Thanks!

Doug Smith 0 votes
Comment actions Permalink
1
Avatar

It is in the logic of the rule. For example, if you have Workflow Rule B that checks a box if the date changes, it won't work if the date is indirectly changed by another task. If you create a Workflow Rule A that changes dates and this box is checked, it will treat it as a direct versus indirect change and will be able to trigger Workflow Rule B. There is a limit of how many rules you can chain in this way, and there is no direct link that you code into the rule A.

Josh Santos 1 vote
Comment actions Permalink