This is a reposting of an article I originally wrote on my Developing for Dynamics GP blog.
A little while ago, I posted an example of Obscuring Table Data Fields using the Support Debugging Tool.
During my recent Dexterity Training class, I showed this example to the attendees and was asked about how the obscuring worked with reports.
So, as a test, we printed the RM Customer Report from the Customer Maintenance window to find that the Credit Card Number on the report was still obscured.
The RM_UNOBSCURE Non-Logging Trigger did not fire with the Report Writer and so the data is shown as it is stored in the table.
To resolve this issue I used the Support Debugging Tool’s Runtime Execute window to create a Report Writer function based on the rw_TableHeaderString function.
To use the Report Writer function, modifiy the report and create a calculated field which calls the User Defined function rw_TableHeaderString in the system series.
Below are parameters you need to pass through to the rw_TableHeaderString function:
Product ID: For Support Debugging Tool 5261
Script ID from Runtime Execute: RW_UNOBSCURE
Field to be unobscured: RM_Customer_MSTR.Credit Card Number
Number of left hand characters to display
Number of right hand characters to display
Then drag the calculated field on to the report and hide or remove the original field.
The Report Writer function will work for both obscured and unobscured data in the table, it only unobscures when required.
If the Number of left hand characters and Number of right hand characters are both zero (0), the entire credit card number will be displayed.
If one or both of the Number of characters to display parameters are used, the credit card number will be masked except of the numbers of characters specified.
(c) Credit Card Number = FUNCTION_SCRIPT( rw_TableHeaderString 5261 “RW_UNOBSCURE” RM_Customer_MSTR.Credit Card Number 4 4 )
For a credit card number of 1234-5678-9012-3456, the calculated field above will show 1234-XXXX-XXXX-3456.
I have updated the archive attached to the original post (Obscuring Table Data Fields using the Support Debugging Tool) to include the RW_UNOBSCURE Runtime Execute script as well as a modified example of the RM Customer Report.
The Support Debugging Tool Debugger Settings file with these triggers is also attached as an archive to the bottom of this post.
Note: The function used for this example ito obscure the data is a very simple algorithm built into Dexterity and is only meant to stop the data from being easily readable. It is NOT secure and does not meet any compliance standards for encryption of personal data. Use at your risk.
If you want proper encryption of Credit Card details, there are solutions from Independent Software Vendors (ISVs) for Microsoft Dynamics GP.
Let me know what you think of the update.
This article was originally posted on the Developing for Dynamics GP Blog and has been reposted on http://www.winthropdc.com/blog.