Share via


Update: Microsoft Dynamics GP 2013 R2 updates to Report Writer Functions - RW_CoAddrIDInfo broken

David Meego - Click for blog homepageFollowing on from my post: Microsoft Dynamics GP 2013 R2 updates to Report Writer Functions, I have to admit that I made a mistake.

The Problem

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.

 

The Fixes 

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.

 

Using Dexterity

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. 

David

TFS Bug 79342 Fixes.zip

Comments

  • Anonymous
    August 21, 2014
    And I meant alien in the best possible way. ;) Mark

  • Anonymous
    September 01, 2014
    Ha! You may very well be an alien (and I suspect you are), but you're OUR alien and we will always be at your side! Looking forward to seeing you in Fargo! Leslie

  • Anonymous
    September 10, 2014
    Hi David, When you refer to Both fixes should be removed once the original code is fixed. do you mean when the next service pack is released to fix this then we should remove the code? Thanks Deb

  • Anonymous
    September 10, 2014
    Hi Deb The fix for GP 2013 will be the next hotfix release, due in November. It will also be fixed in GP 2015. David

  • Anonymous
    March 19, 2015
    Hello can you pull the address id from the Primary bill to addr ID? instead of hard coding it?

  • Anonymous
    March 21, 2015
    Hi Kayla Use RW_RMAddrIDInfo instead. in 'Customer Number' IN_Customer_Number; in 'Address Code' IN_Address_Code; { Leave Blank for Default } in integer IN_Field; David