How to Identify Duplicate Records by Multiple Fields in ServiceNow

I have some records in a table which are duplicates. In this case, I can only identify “duplicate records” by whether several fields are identical; not just one. For example, let’s say I want to identify Incidents where the Short description, Assignment group, and Assigned to user are all the same. If only one or two of those fields match, but one of them is different, then the records are not duplicates. The’re only duplicates if all three fields are the same.

Is there any way to accomplish this with a script? Maybe by using GlideAggregate?

Thanks for your question, and indeed, there is a way to identify duplicate records based on multiple matching fields in a script in ServiceNow!

At first glance, you might think that the GlideAggregate APIs do not support any direct mechanism by which to identify duplicate records across multiple identical fields. However, there is a way!
By getting just a smidge clever, we can call the .groupBy() API method multiple times, in combination with the .addAggregate() and .addHaving() methods, to accomplish our goal of identifying duplicate records with more than one field that are identical.

Read on to learn more!

Read more

How to Merge Personal & Company ServiceNow Accounts

If you got your ServiceNow certifications or made progress in courses on NOW Learning using a ServiceNow partner or customer account, you may find that when you move on to another company, you no longer have access to those certifications or training progress. This can be frustrating, and unfortunately the process for migrating your certifications and progress from an account linked with your business email to your personal account is not always clear. Googling the question (at the time of writing), I found that the top several results were from old ServiceNow Community articles that are either no longer accurate, or perhaps never were.

This ServiceNow Pro-Tip article was inspired by a thread on the ServiceNow Developer community Discord server, and aims to give you an up-to-date and accurate answer as to how you can merge your old corporate ServiceNow / NOW Learning account from your ServiceNow partner or customer business email into your personal account, so you can retain your certifications and progress even after you’ve left the customer or partner company. If ServiceNow changes the process by which this is done (again) and you notice that this article becomes outdated, please leave a comment below and let me know the updated process so I can update this article and keep folks informed.

Read more