0

I have a list and this list has several columns and rows that all stay the same for the most part except for the Assigned To column. Basically every time that the column is changed it should send an email to the user it was changed to and myself.

I have a workflow that has settings set up so it executes:

Start Workflow automatically when an item is created (selected)
Start Workflow automatically when an item is changed (selected)

My workflow code is:

Stage: Stage 1
    Email Current Item:Assigned To
Transition to stage
    Go to End of Workflow

The first time I edit the list item and I assign it to someone it emails as expected and works perfect. However if I remove that person, and save then put them back on it they do not get an email. They also do not get an email if I switch the person. It seems to only run on the first change and then never again. I would like it to run every time there is a change.

As requested below are two pictures one is of my workflow settings and the other is of the code.

workflow settings enter image description here

  • Can you verify your workflow is triggering when user edits the item? – ThinkB4Code Sep 25 '19 at 19:03
  • Well I already have. If it was it would send an email. I'm trying to determine a solution as to why it wont trigger. @ThinkB4Code – Fletchy1995 Sep 25 '19 at 19:24
  • Can you provide the screenshot of Workflow settings as well? – ThinkB4Code Sep 25 '19 at 19:29
  • As requested photos have been added @ThinkB4Code thanks for your help :) – Fletchy1995 Sep 25 '19 at 19:53
  • can you try logging something in workflow history list? – Akshay Randive Sep 26 '19 at 1:08
0

The issue was not the connection of the workflow to the list. The issue was the items within the workflow failing to find items in the list. When the workflow was executed the second time one of the items it was trying to pull did not have anything in it so it would give a NullPointerException. It then suspended the workflow so it did not try to run it again and encounter the same error.

I resolved the issue by removing the workflow, and rebuilding it from scratch double checking all the connections. Once I ensured the connections would always have data in them, the workflow worked as expected.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.