Solved

Get Next RETDOCID in Microsoft Dynamics Great Plains stored procedure

Posted on 2015-01-20
2
203 Views
Last Modified: 2015-01-21
I'm trying to find a stored procedure in Great Plains that gets the next RETDOCID. I was hoping to be able to find something similar to taGetSopNumber, but if that's not available, what would be the best method for generating the next RETDOCID when creating an RMA?

Thank you in advance!
0
Comment
Question by:echobridge
2 Comments
 
LVL 18

Accepted Solution

by:
Steve Endow earned 500 total points
ID: 40561102
Hi,

I believe the stored proc you are looking for is:

SVC_New_DocumentID

Here is the SQL call that GP performs to generate the next RMA number.

BEGIN 
DECLARE @stored_proc_name char(26) 
DECLARE @retstat int 
DECLARE @param2 char(15) 
SELECT @param2 = '' 
SELECT @stored_proc_name = 'TWO.dbo.SVC_New_DocumentID' 
EXEC @retstat = @stored_proc_name 'RMA', @param2 OUT 
SELECT @retstat, @param2 
END 

Open in new window


Let me know if that works for you.

Thanks,

Steve Endow
Microsoft MVP - Dynamics GP
Dynamics GP Certified IT Professional
0
 
LVL 1

Author Closing Comment

by:echobridge
ID: 40562005
Perfect! Exactly what I was looking for.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question