Solved

Get Next RETDOCID in Microsoft Dynamics Great Plains stored procedure

Posted on 2015-01-20
2
205 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 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
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.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

732 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