[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Get Next RETDOCID in Microsoft Dynamics Great Plains stored procedure

Posted on 2015-01-20
2
Medium Priority
?
214 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 18

Accepted Solution

by:
Steve Endow earned 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
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
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

650 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