Update: Microsoft Dynamics GP 2013 R2 updates to Report Writer Functions - RW_CoAddrIDInfo broken
Following on from my post: Microsoft Dynamics GP 2013 R2 updates to Report Writer Functions, I have to admit that I made a mistake.
The update to the RW_CoAddrIDInfo() report writer function has broken the code. It works when no Address ID is supplied to return the information from the default Address information stored on the Company Master table, but fails to return any results from the Location Master table when an Address ID is provided.
I looked at the code and identified the issue and have logged the proposed fix with the development team as TFS Bug 79342. Hopefully, we can get the fix into the next GP 2013 R2 release soon.
In the meantime, I have created a couple of workaround fixes which can be used until the code is fixed by development. They are attached to bottom of this article.
Using Support Debugging Tool
The first fix uses the Support Debugging Tool (https://aka.ms/SDT) to create a custom Report Writer function which can be called using the following syntax:
FUNCTION_SCRIPT( rw_TableHeaderString 5261 "RW_COADDRIDINFO" "Address ID" 0 X )
where the Address ID can be specified as a string constant or from a variable and X is the data you want returned.
The Runtime Execute script and an example custom report are in the archive for you to use.
If you already have the SDT installed in the Recommended Configuration (with a shared setup file), you can deploy the fix by importing the configuration settings xml file once on any workstation and updating your reports to use the function call above.
The second fix is a small Dexterity chunk file which triggers a corrected version of the RW_CoAddrIDInfo() function after the original and so provides the correct results. It can be used without making changes to existing reports, however, the chunk will need to be deployed on all workstations that need the fix. The chunk file and its source code are provided in the archive for you to use.
Both fixes should be removed once the original code is fixed.
See I am human, and not the Alien that Mark Polino thinks I am.