Support Portal ContactGet in touch

Checking System Jobs in Dynamics

   Words by Paul McQuillan

   on 12/04/2018 16:00:00

While we may not be a Developer, we may still want to check whether a custom piece of logic in Dynamics CRM is running correctly.

These custom pieces of logic are typically Plugins written by a CRM Developer to implement some bespoke actions or integration on trigger of a certain event – such as the creation of a new Oportunity or an update to an existing Contact.

If we find that this logic within CRM is not taking place or not working correctly then we can check the list of System Jobs in CRM to see if the Plugin is raising an Error that will explain why this is not working.

To do this, we can navigate into the Settings Area of Dynamics and then into System Jobs.

This will present a list of the System Jobs taking place in CRM and whether these are Waiting, In-Progress, Succeeded or Failed.

image

Reviewing the list of System Jobs

Failed System Jobs indicate where a Workflow or Plugin has tripped an error and so failed to execute normally.

To understand why this has Failed we would need to drill down into the Code and see what is going wrong – which would be a task for a developer.

However we can help this process by opening the Failed System Job, viewing the error and then highlighting this to Development:

image

Drill-down into a specific Failed System Job

So in the above example, we have a piece of Plugin Logic that is attempting to read a Field in CRM that does not exist.

As the Contact Entity in CRM does not have a ‘customerid’ field and so the Plugin is raising this error at the point in the code that is trying to read this non-exisitent field.

Once passed back to the original developer, this can be corrected to the right field ‘parentcustomerid’ and the Plugin fixed to perform the logic successfully.

This list of System Jobs in CRM then forms a key source of information for fault-finding in Dynamics when normal (or newly added) logic is not working correctly.

In many ways, this list of System Jobs can then work like the Event Log for a Server or Workstation, giving us a blow by blow account of Successful, Warning or Error Events to indicate the health (or otherwise!) of the system.

Similarly to the Event Log, System Jobs logs almost everything happening in the Back-End Servers of Dynamics and so lists events for:

  • Plugins
  • Workflow
  • Reoccurring System Jobs
  • Calculation Jobs for Rollup, Calculated Fields or Goals
  • Database Tasks such as Reindexing or Data Imports

These Events are being performed by the Asynchronous Service in the Back-End Dynamics Server, so if we see many ‘Waiting’ Events that are neither Failing nor Succeeding then this can be example of where the Asynchronous Service has Stopped or Failed, however this is quite rare.

Like almost any other set of Records in CRM, we can query the list of System Jobs using the Advanced Find to pick out or filter on certain types of Job – this can be helpful to just review System Jobs that are a result of Workflow, or to check the Sysem Jobs for how CRM is handling Server-side sync of Emails.

image

Using the Advanced Find to only view System Jobs relating to Mailbox Tests (for Server-side Email Sync)

So whilst the remediation may be in the realm of development, we can use these System Jobs to help identify problems and understand their root cause – and as this also applies to non-development activities such as Workflow and System Configuration, is a key eye for any Functional, Support or Development analyst working with Dynamics.

Prefer to go old-school?

Write to us using the below addresses.

Head Office
CRM Consultancy
61 Oxford Street
Manchester
M1 6EQ

London Office
CRM Consultancy London
Grosvenor Avenue
London

Content © CRM Consultancy.