Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Retrieving the next value of a sequence through a Dexterity procedure

Posted on by Microsoft Employee

Has any one tried getting the next value of a sequence through a stored procedure and accessing it through dexterity? I created a sequence in the database and a stored procedure to get the next value. the stored procedure works when I try it by itself.

Then in dexterity I created the procedure template where I call the stored procedure from the database using call sproc. I have the call to the procedure template in a form event.

When I tested this, the event called the procedure, but it appears some error is preventing the value from coming back. I have the value stored as a Long in  dexterity, the sequence is an integer.

Does anyone know if this can be done, or is there a problem with getting a sequence value into dexterity? Or does anyone know how I can get the error from the procedure to display?

The procedure is granted execution by DYNGRP, the parameters are just the value being returned.

*This post is locked for comments

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Retrieving the next value of a sequence through a Dexterity procedure

    Well finally searched using the right terms to come up with the answer. After digging a bit more I saw that the problem was getting to the stored procedure in the first place. I was getting a stored procedure not found.

    Once I figured that out I was able to search and finally got the right combination to lead me to this post:

    community.dynamics.com/.../123777

    A similar problem to mine, though the solution to this one was not my problem. Naga M. Siva Kiran offered the solution to my problem in a suggested answer to the post above.

    The issue had nothing to do with the sequence as I had initially thought.  It had to do with the Dynamics series assigned to the prototype procedure in Dexterity. I was using System (my default for some reason). Any script using System is not visible by the company database. Any other series works. I recreated the script with the Series Financial, and everything worked as expected.

    So yes you can call the next value of a sequence in a stored procedure and send it back to a Dexterity form. Just be sure not to choose System for the series.

    Thanks Naga!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans