Find Unused Labels – Dynamics 365 Finance & Operations

Dag CalafellDynamics 3654 years ago19 Views

How many of your labels do you maintain, and yet are not being displayed in any way to a user?

I set out to answer this question on one of my projects, and found 10%, over 100 labels, were created and abandoned as functionality was changed over time.  These labels did not provide any value, and might lead to requiring translations which would never be shown to anyone.

The following PowerShell script takes the path of a module and will check that every single label is being used.  It checks the actual code instead of relying on the cross reference database (just in case).  The return value is an array of PowerShell objects which can be saved as  CSV, or filtered to find ones which can be deleted.

https://github.com/dodiggitydag/Find-UnusedD365FOLabels

Find-UnusedD365FOLabels “C:\VC\Dag\DEV1\Main\Metadata\DagExtensions\DagExtensions” | Export-Csv -NoTypeInformation -Path “$env:USERPROFILE\Desktop\Unused Labels.csv”

Please try this on your project(s) and let me know how many unused labels you are able to delete!

Disclaimer: make sure a label is not being used in any branch before removing it from all of your branches   The F&O compiler should reject the objects which are missing labels, but don’t assume.

Example

In this example I’ve added two unused labels.

I run the command here.

Exported to CSV, it is easy to filter by used/unused and take action.

The post Find Unused Labels – Dynamics 365 Finance & Operations appeared first on Dag Calafell, III.

Original Post https://calafell.me/find-unused-labels-dynamics-365-finance-operations/

0 Votes: 0 Upvotes, 0 Downvotes (0 Points)

Leave a reply

Join Us
  • X Network2.1K
  • LinkedIn3.8k
  • Bluesky0.5K
Support The Site
Events
March 2025
MTWTFSS
      1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31       
« Feb   Apr »
Follow
Sign In/Sign Up Sidebar Search
Popular Now
Loading

Signing-in 3 seconds...

Signing-up 3 seconds...