Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Tracing in Workflows (Workflow Activities)

Posted on by 189

Hi,

I have a hard time figuring out how to properly trace things in Workflows. When I create a new WorkflowActivity through the Visual Studio Dynamics templates there are a few calls to tracingService.Trace(), but I don't know where I can actually see this information during Workflow execution time.

I tried to enable tracing by setting 'Enable loffing to plug-in trace log' under Settings\Administration\SystemSettings\Customization, and by setting parameters in the registry as described here: https://support.microsoft.com/en-us/help/907490/how-to-enable-tracing-in-microsoft-dynamics-crm

But I don't find any of the information traced by the tracingService, not under Settings\Plug-In Trace Log nor in the trace folder.

Does anybody know how to do this, and actually traced some information?

Kind regards,

Kai 

*This post is locked for comments

  • Yash Trivedi CRM Profile Picture
    Yash Trivedi CRM 335 on at
    RE: Tracing in Workflows (Workflow Activities)

    what,i should register in sandbox???beacuse i am getting same problem after, this I set the option 'Enable loffing to plug-in trace log' in 'Settings\Administration\SystemSettings\Customization' to 'All',

  • KaiHartmann1981 Profile Picture
    KaiHartmann1981 189 on at
    RE: Tracing in Workflows (Workflow Activities)

    Oh, it's not working outside of 'sandbox' mode? That might be it, since we use 'none'.

  • Verified answer
    ntn32 Profile Picture
    ntn32 401 on at
    RE: Tracing in Workflows (Workflow Activities)

    And register it in sandbox mode.

  • KaiHartmann1981 Profile Picture
    KaiHartmann1981 189 on at
    RE: Tracing in Workflows (Workflow Activities)

    Then I seem to be missing something. I set the option 'Enable loffing to plug-in trace log' in 'Settings\Administration\SystemSettings\Customization' to 'All', and have several Trace-calls in my workflow. Is there anything else I have to do?

  • Suggested answer
    ntn32 Profile Picture
    ntn32 401 on at
    RE: Tracing in Workflows (Workflow Activities)

    Tracing workflow means, if you have any custom workflow registered and in that if any trace logs is written, then those message will be shown in "Plug-in trace logs".

  • KaiHartmann1981 Profile Picture
    KaiHartmann1981 189 on at
    RE: Tracing in Workflows (Workflow Activities)

    Even for tracing workflows? I cannot get it to work.

  • Suggested answer
    ntn32 Profile Picture
    ntn32 401 on at
    RE: Tracing in Workflows (Workflow Activities)

    Hi, 

    There are two ways to see trace logs of plugin or workflow activity,

    1. Navigate to Solutions -> Plug-in Trace Log.

    1134.5.PNG

    2. Go to Advance Find and select "Plug-in Trace Logs"

    1134.5.PNG

  • KaiHartmann1981 Profile Picture
    KaiHartmann1981 189 on at
    RE: Tracing in Workflows (Workflow Activities)

    Thanks for the replies.

    Where do I see what is logged to the TraceLog Entity? Is there a view or something?

    The tracingService I talked about is actually created like this already:

    ITracingService tracingService = executionContext.GetExtension<ITracingService>();


  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Tracing in Workflows (Workflow Activities)

    I think you will have to add tracing in the code as well.

    ITracingService tracer = executionContext.GetExtension<ITracingService>();

    tracer.Trace("Tracing Comment goes here");

    You can trace at multiple points in your workflow activity and add useful information.

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: Tracing in Workflows (Workflow Activities)

    Data passed to tracingService.Trace should be written to the TraceLog entity. However, be aware that there's a bulk deletion job that runs every day to delete data from this that is more than a day old

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