Service Request Purging - Utility for Easily Deleting Service Requests

Version 1
    Share This:

    There are times when deleting Service Requests are required but this is definitely not straight forward like it is for the other ITSM modules such as Incident, Change, Work Order, etc.  All those other modules allow you to do a Delete if you are an administrator and have OnDelete workflow in place to clean up the supporting entries from other related forms (in later versions, older pre-7.6.04 versions I don't believe had this completely implemented).


    In SRM, there is actually workflow that stops you from performing delete and which forces you to not only disable that workflow, but also to expose the Delete function on the SRM:Request form if you want to delete by hand.  Even then, this unfortunately does not delete all the supporting data so there is much more cleanup required to 'cleanly' delete a service request.


    I have put together and published a simple utility that should automate the process and published it along with full source code for those interested in extending it.  You can read my post explaining what exactly it does and doesn't do as well as download the utility and code.



    Please share any feedback on the tool and if any bugs are found I will update and post newer version.  For example I have not fully traced every entry that gets created when you create a Service Request and only relied upon that published list of forms/relationships in the BMC community posts referenced in my post so there may be some forms missing since that post is a couple of years old so if anybody knows other forms that should get entries deleted when SRs are deleted you can post in the comments and it is easy to add to the utility.


    As always this utility is provided as is with no guarantees so please do your own due diligence prior to running against important environments.


    I hope this utility proves useful is useful to the community.