web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Rollback a GP Procedure

(0) ShareShare
ReportReport
Posted on by 92

Good Morning,

I'm asking about the GP procedures with which it is possible to develop wrappers to, for example, combine customers.  My question is whether it is possible to control transaction handling of the GP procedure via the wrapper?  So, if I wanted to test something I could rollback the changes after verifying the logic was working correctly.  Thank you.

Categories:
I have the same question (0)
  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,137 Most Valuable Professional on at

    You can trigger before and after a procedure.

    You can start a SQL transaction before and ask to commit or rollback afterwards.

    It would depend on how the code in the procedure is written, specifically whether it creates a new SQL connection or uses the existing one.

    So in theory it is possible, but would need to be tested to see it works.

    It would need either Dexterity or GP Power Tools developer tools to achieve it.

    Regards

    David 

  • NCOPP Profile Picture
    92 on at

    Hi David.

    Thanks for the response. Actually, I was able to determine that the GP procedure I was wrapping did in fact look at @@TRANCOUNT to determine whether it should execute within or create its own transaction.

    I thought it was not working because I forgot that there are fixed length char fields in GP. As a result when I tested the rollback and expected to see data, I was not seeing it.  It is working well.

    Thank you!

    - Nick

  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,137 Most Valuable Professional on at

    Awesome. Well done.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 617

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 461 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 298 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans