Tuesday, August 28, 2012

Viewing Audits Related to a Given Window


Written By Jim Peliksza,
Developer at Rockton Software
Great!  You’ve installed Rockton Software’s Auditor and configured it to capture everything that you’d ever want to look at!  You’ve been running it for six months and now you have a hundred-thousand changes all saved in the Audit Log.  Fantastic!

Now let’s say you are entering a new Invoice on the ‘Sales Transaction Entry’ window—you select your Customer and you realize that the wrong ‘Ship to Address’ has defaulted in again.  This is the third time I’ve had to put the correct ‘Ship To’ on this Customer.  Who the heck keeps changing that? you wonder . . . Ah, but wait!  You have been tracking that scenario for the last six months!  Perfect.  All I have to do now is go look in the Audit Log, you think to yourself.  This mystery is about to be solved!

So . . . you open the ‘Audits SmartList’ and your excitement wanes as you stare at the myriad of tracked changes that you have been collecting for the past half year.  How are you going to find the one you are looking for?  It looks like you might need to know just how this change was audited in order to be able to enter the correct Search Criteria that would narrow down the list enough for you to be able to find the needle in the haystack that is the culprit.  Sheesh, I don’t know what the heck I need to look for, you think to yourself, feeling a little overwhelmed.

This problem is all too common when a company starts to use an auditing system.  Sure, the data is in there somewhere, but how do you get at the stuff you need?

Wouldn't it be nice if you could just see a list of all of the audits that had anything to do with the Customer that you just selected without having to leave the Sales Transaction Entry window?

Why, yes.  Yes it would.  Rockton comes to the rescue again!

The most recent builds of Auditor include a way for you to be able to see audits that have been captured for whatever is displayed on the window that you are currently using.  This feature is called Related Audits.  What follows is a step by step example of how to enter setups that will allow you to realize the amazing functionality described above.

First, track changes to Customers’ Ship to Addresses

In order for you to be able to find out who made the change, you first need to have been capturing this type of change all along.  For the purposes of this article, we will assume that you already have this set up, however, for those of you who want the background on how to define this audit, we will describe that now.  Or, you can skip directly to the next section: Set up the Related Audit definition.

Tracking this change is done by defining an Audit that will log anytime anyone makes a change to a Customer’s default ‘Ship to Address.’ This data is stored in the ‘Primary Ship to Address Code’ field on the RM Customer Master table, so one common way to accomplish this is to simply track changes to this field on this table.

You first need to create a new Audit Group.  The name doesn’t actually matter–it just needs to make sense to you. Then, you will define the audit within this Audit Group.

1. In Microsoft Dynamics GP, click the Auditor toolbar icon ( ).  Then choose Audit Groups.
2. In the Group Maintenance window, enter CUSTOMERS as the Group ID.  Enter “Changes related to Customers” in the Group Description.
3. Click the Add Audit button () and choose Table Audit from the drop-list.
4. Since we want to create an audit on the RM Customer Master, type Customer in the Search field and then choose either the Enter or tab key.
5. From the results, highlight the RM Customer MSTR table for the Microsoft Dynamics GP product and then click the Select button.
6. In the Auditor Table Maintenance window, we need to set up what options and fields we want to audit so that we log the results that we want.  Mark the Changes box in the Tracking options section at the top of the window to indicate that we want to log changes to Customer Master records.
7. Find the Primary Shipto Address Code field in the list.  Then, mark the Audit column checkbox.  This tells Auditor that you want to track anytime anyone makes a change to this field.  Marking the Note column checkbox also forces them to enter the reason that they are making a change to this field.
8. Click OK to save this new audit setup.
9. Back on the Group Maintenance window, click Save.
10. Finally, close the Group Maintenance window.  This is necessary to initialize the Audit Group(s) that you have set up here.

Set up the Related Audit definition

Ok, now for the good stuff.  You will now set up a Related Audit, so that the audit information captured by the Audit Group defined above can be viewed directly from the ‘Sales Transaction Entry’ window based on a rule that you assign.  In this case our rule will be, “I want to display audits where the Customer Number on the audit matches the Customer Number displayed on the ‘Sales Transaction Entry’ window.

Note that you will need to be an Auditor Administrator on the System Settings window in order to be able to complete this setup:
1. Go to Transactions > Sales > Sales Transaction Entry.  Choose View Related Audits from the Additional menu.
2. In the View Related Audits window, click the Rules button.  
3. In the Related Audit Rules list, highlight Window ‘Sales Transaction Entry’ and click the Add Rule button () to create a new rule for this window.
4. In the Rule Setup window, click the Add Window Field Relationship button () to open the Window Field Relationship Setup window.
5. For Window Field, type or select Customer Number.  
6. For Field List, type or select CUSTOMER NUMBER.
7. Click the OK button to close the Window Field Relationship Setup window.
8. Click the Save button to close the View Related Audits window.
9. You will now see the new Rule that you just created on the Related Audit Rules Setup window.  Click OK to close this window.

That’s it!  Your users will now be able to see any audit that was captured for the Customer that is displayed on the ‘Sales Transaction Entry’ window by just going to Additional > View Related Audits.  

Test the Audit and View Results

We can now verify that our audit information is working correctly by changing the ‘Ship to Address’ for a Customer.  We will then see if this audit shows up when we use this Customer on an Invoice.

Select a Customer on the ‘Customer Maintenance’ window.  In the ‘Ship to’ field, enter or select a value that is different than the one that is currently selected, then save this change.  The change will now be tracked to the Audit Log.  If you marked the Note column for this field in your audit definition, then you will also be prompted to enter a reason for making this change. 

Now let’s see what an average user would see.  On the Sales Transaction Entry window, make sure you have selected the Customer that you changed above.  To see what changes were made to this Customer, choose View Related Audits from the Additional menu.  VoilĂ !  You should now see that the audit that you just logged is listed!  

Much easier than fumbling through Smartlist search criteria, eh?

Suppose you have defined audits for other types of Customer changes.  If someone has made any of these other changes to this particular Customer, then those changes would be logged as audits and you will them listed here as well.  It is now easy to find the one change to the ‘Ship To Address’ by sorting on the Field Name column and scrolling down until you find the change for the ‘Primary Ship to Address Code’ field.

Also, keep in mind that you can do this for virtually any window in Microsoft Dynamics GP.  You just need to know what it is you want to see, and then set up a Rule for that window.  



No comments:

Post a Comment