?
Solved

Get Next RETDOCID in Microsoft Dynamics Great Plains stored procedure

Posted on 2015-01-20
2
Medium Priority
?
212 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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Suggested Courses

770 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