Reversing Transactions in MDS

Standard

Recently we needed to reverse some transactions in MDS. We found the transactions by going to Version Management > Transactions from the MDS main page. Then we added filters to show the entity that was changed and the member code as per below:

MDS

I then thought to myself that MDS has some decent stored procedures (while the rest of it can be a bit of a mess and hard to use, like seriously have you ever tried to edit three tiered models? It’s a nightmare), so why not see if there’s one I could use.. And indeed there was. First go and find the ID of the transaction you want to reverse by querying the mdm.tblTransaction table:

SELECT TOP 100 *
FROM mdm.tblTransaction T
WHERE NewCode = 'De-Activated'

Then query the mdm.tblUsers table to get your ID:

SELECT id, DisplayName
FROM mdm.tblUser
WHERE DisplayName LIKE '%Jim%'

Now you’re ready to run the stored procedure

EXEC [mdm].[udpTransactionReverse]  @User_ID = 40, @Transaction_ID = 7445864

Then when you refresh the Transactions page again you’ll notice that the transaction has been reversed under your username. Enjoy 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s