I have had a number of support cases and newsgroup posts recently about Customization to the Cash Receipts (RM_Cash_Receipts) window failing to work for Microsoft Dynamics GP 2010 when they worked for previous versions.
The problem is that the code appears to work, but the Document Number field is never populated and always returns an empty value.
The reason is that changes to the RM_Cash_Receipts window for GP 2010 have moved the 'Document Number' field to a hidden field beneath the window and replaced it with a local '(L) STR17DocNumber' field. It is this new local field that must now be used to obtain the Receipt number of the transaction from the window.
This change was made so that recurring transactions could add a 3 digit suffix 001, 002, etc. onto the 17 character document number and that would use the maximum 20 characters in the table.
Below are some steps for getting your customization working again:
For Dexterity
Replace all references to 'Document Number' of window RM_Cash_Receipts of form RM_Cash_Receipts with '(L) STR17DocNumber' of window RM_Cash_Receipts of form RM_Cash_Receipts.
If you have a single customization which has source code shared across multiple versions of Microsoft Dynamics GP, use pre-compiler directives with a constant to conditionally compile your code:
#if MBS_PROD_VER_MAJ >= 11 { GP 2010 code here referencing '(L) STR17DocNumber' field }#else { Previous code here referencing 'Document Number' field }#end if
For Visual Basic for Applications (VBA)
To fix a VBA customization, we need to make sure that the new '(L) STR17DocNumber' field is being referenced rather than the old 'Document Number' field. The easiest way to confirm this is to add the window and fields to VBA again.
Hope this helps.
David
25-Aug-2011: Added information on why the change was made in GP 2010.
Posting from Mark Polino at DynamicAccounting.net
msdynamicsgp.blogspot.com/.../customizations-to-cash-receipts.html
I've had this similar question in support cases as well. But sometimes it takes a different flavor--WHY would Dynamics GP reduce the number of characters allowed (keyable) for this field from 20 down to 17?
The reason is that now in Dynamics GP 2010, recurring cash receipts batches can now be entered. We reduced the editable characters in that field in order to make space for the 001, 002, 003 value at the end, to denote which recurrence of the transaction you are viewing.
Thanks Tammy,
I was wondering why this change was made.
Hi David,
I followed your steps and I still get a blank value for the Cash Receipt Number.
Any other suggestions?
Thanks so much.
Brent
PLEASE READ BEFORE POSTING
Please only post comments relating to the topic of this page.
If you wish to ask a technical question, please use the links in the links section (scroll down, on right hand side) to ask on the Newsgroups or Forums. If you ask on the Newsgroups or Forums, others in the community can respond and the answers are available for everyone in the future.