Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

How to validate if custom workflows are firing onSave and onLoad of record creation

Posted on by 15
Entity contact = new Entity("contact");
contact.Attributes.Add("fullname", "h api test");
contact.Attributes.Add("emailaddress1", "hh@devenv1.local");
contact.Attributes.Add("telephone1", "1");

Guid contactId = service.Create(contact);
Console.WriteLine(contactId);

I am doing a basic API test, by creating a contact in this example.
What I want to test is any sort of custom and normal workflows that should fire when this is created.

I actually want to test workflows in general in Dynamics so how can I test that they are working as intended?
  • Justinp Profile Picture
    Justinp 175 on at
    RE: How to validate if custom workflows are firing onSave and onLoad of record creation

    Hi Hus44,


    Yes that is the tool I am referring to. 
    Go to: https://www.xrmtoolbox.com/ (the XRM toolbox tool). 

    Install it, then connect to your CRM organization.  You might have to in the application go to under "configuration", "tool library" to add the plugin.
    This will only show you what is meant to run on CRUD operations.

    If you want to see what actually ran then yeah I think you will have to go i to CRM/D365 go to Settings, System jobs and filter by started on (today) and System job  (Workflow) OR regarding record, where the record is the one you just created.  this will show you all the workflows that executed on that record. 
    I don't know how to show what actually ran without going into CRM with the exception of running a xml query the the previously explained logic in the system jobs through XRM toolbox (View designer plugin).

    Cheers,
    Justin

  • Hus44 Profile Picture
    Hus44 15 on at
    RE: How to validate if custom workflows are firing onSave and onLoad of record creation

    Hi Justin,

    Is this the tool you are talking about -

    community.dynamics.com/.../new-xrmtoolbox-plugin-synchronous-events-execution-order-editor

  • Hus44 Profile Picture
    Hus44 15 on at
    RE: How to validate if custom workflows are firing onSave and onLoad of record creation

    I don't think I explained my question clearly.

    So from that code I have written I am testing Dynamics API ... so im connecting to it and creating a contact record.

    What I want to do is know what work flows run and when ... e.g record creation, update , delete or something else. Then code something that will test that somehow.

    So I don't have to manually check by going into Dynamics.

    Any suggestions ?

  • Hus44 Profile Picture
    Hus44 15 on at
    RE: How to validate if custom workflows are firing onSave and onLoad of record creation

    I don't think I explained my question clearly.

    So from that code I have written I am testing Dynamics API ... so im connecting to it and creating a contact record.

    What I want to do is know what work flows run and when ... e.g record creation, update , delete or something else. Then code something that will test that somehow.

    So I don't have to manually check by going into Dynamics.

    Any suggestions ?

  • Suggested answer
    tcardoso Profile Picture
    tcardoso 137 on at
    RE: How to validate if custom workflows are firing onSave and onLoad of record creation

    if you go to the register you can check if any workflow executed, additional you can enable audit to check any change on the register, after it's created.

  • Justinp Profile Picture
    Justinp 175 on at
    RE: How to validate if custom workflows are firing onSave and onLoad of record creation

    Hi,

    I hope I understand what you are looking for here.

    You want to see if any workflows ran against a record:

    You would look under Settings, System Jobs.

    Filter by System job = workflow & Your regarding record, you created/saved.

    To look at processes that should run, go to Settings, Processes & filter by the entity you are acting on, you can the open the workflows to see what the trigger event should be.

    - Can't stop adding to this, I keep thinking of new ways:
    You can also use XRM Toolbox (a great CRM admin/ CRM developer tool) specifically the Synchronous events execution order editor

    Thanks,
    Justin

  • Kamalkant Sharma Profile Picture
    Kamalkant Sharma 55 on at
    RE: How to validate if custom workflows are firing onSave and onLoad of record creation

    Hello,

    You can create a WF Process in CRM  on Contact Entity which will run on CREATE of Contact Record and within  your process you can perform some action like  update mobile number of this Contact to 999999 like this you can test the workflow execution. And for your information Workflows never execute on ONLOAD event.

    Hope this will help you.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans