web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Workflow to create record on custom entity

(0) ShareShare
ReportReport
Posted on by 91

Hi all

I recently asked and got an answer to this question - https://community.dynamics.com/crm/f/117/t/322940 thanks Kokulan . However the trigger action requirement has now changed. 

To recap, we have a new activity entity called Quality Issue Investigation. 

The requirement is to create a new record for Quality Issue Investigation when the status reason of a case is changed to Quality Investigation. I say Status Reason not Status to be sure it is not confused with record active/inactive.

I have created a workflow to trigger when status reason changes, checks if the Status Reason is Quality Investigation and then create a new Quality Issue Investigation record. However it is not creating the new record. I can not see why? 

Is this the right way to create a new record off of a field change trigger?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Kokulan Profile Picture
    18,054 on at

    Hi Mark

    It's me again.

    I assume you have created your workflow to trigger on "Record status change"? if so this will only trigger when the record Status changes.  If you want the workflow to trigger on Status Reason Change, you have to use Record fields change event. Please see below

    ScreenClip-_5B00_668_5D00_.png

    If its still not triggering for you, please share some screenshots.

  • Mark WHE Profile Picture
    91 on at

    Hi Kokulan

    Yeah that is one of things i became aware of very early on with CRM. Like i said in my post I say Status Reason not Status to be sure it is not confused with record active/inactive. The workflow is set to trigger on record field change of Record Status.

    4863.Capture2.PNG

    4863.Capture2.PNG

    This workflow is set to work in the background, however I have tried this both ways without success.

  • Suggested answer
    Charles Abi Khirs Profile Picture
    3,569 on at

    Hello,

    The workflow looks good and should normally work.

    1. Make sure that the Status Reason is being updated.

    2. In the workflow, uncheck the option "Automatically delete completed jobs" and check if there are workflow jobs being created or in the case record, look into the background processes

    3. check if there are any other DEV that might be preventing the update of the Status Reason field

  • Suggested answer
    Mark WHE Profile Picture
    91 on at

    Okay, i have resolved this. The other workflow that was not set to run in the background, had the scope set to user. I created a new on demand workflow and set the scope to organization and it works fine.

  • Mark WHE Profile Picture
    91 on at

    Hi Charles,

    Thanks for the response. It posted while i was writing the previous reply.

    As I say i have it working now as an on demand process. What would be the cause of the background job not working?

  • Charles Abi Khirs Profile Picture
    3,569 on at

    How are you updating the status reason field? (even after some time, the background WF is not trigerred?)

  • Mark WHE Profile Picture
    91 on at

    Hi Charles

    the update is done manually in the record, so select from list and save record.

    The strange thing is, with the on demand workflow working, I think the background workflow has also triggered because when i tested the new workflow, i ended up with 2 new records.

    How do i find out when a background workflow is set to run?

  • Verified answer
    Kokulan Profile Picture
    18,054 on at

    Hi Mark

    I have just tried a workflow on my trial instance and it seems to work fine.

    Please make sure, the highlighted are set correctly.

    5700.ScreenClip-_5B00_103_5D00_.png

    I have tried changing status reason couple of times and please see the logs

    5700.ScreenClip-_5B00_103_5D00_.png

    Try the workflow owner account with a Sys Admin role and with above settings, I don't see why it cant work. 

    The version I tried on :

    5700.ScreenClip-_5B00_105_5D00_.png

  • Mark WHE Profile Picture
    91 on at

    Hi Kokulan

    Yep, my workflow matches except i had Automatically Delete selected.

    The workflow has now fired, but only seemed to do so after i triggered the second on demand workflow - giving me 2 new records.

    Same question as i posed to Charles, How do i find out when a background workflow is set to run?

  • Charles Abi Khirs Profile Picture
    3,569 on at

    Hello,

    I think we miss something here. Can you please explain to us how many workflows you have and how they are supposed to run, and what they do...?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans