stevegray
4Penny.net
Points: 55409

11/14/2019 12:13:48 PM

Duplicate master numbers in GP 2016/2018 sopGetMasterNumber

As far as I can tell, this has been going on for a very long time. 

https://community.dynamics.com/gp/f/microsoft-dynamics-gp-forum/156823/sop-entry-duplicate-master-number

https://support.microsoft.com/en-us/help/856311/multiple-customers-have-documents-that-reference-the-same-master-numbe

http://timwappat.info/post/2009/06/19/Duplicate-SOP-Master-number-in-Dynamics-GP

 

A client called today for help, and I printed out the current 'get next master' code and... it didn't make sense. That doesn't mean it's not right... it just didn't make sense. it was conditionally creating a transaction. 

The code below avoids that, and always creates a transaction. 

Please... if you you use this, test it carefully and get back to me if it works, or if it doesn't. I'd like to know.

4Penny.net
Version: Unknown or N/A
Section: Dynamics GP
Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3