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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

Stored procedures called to post batches

(0) ShareShare
ReportReport
Posted on by 75,852 Moderator

I finished an import routine that imports bank transfers and creates a resulting ledger transaction batch. The final piece is the client wants this batch to automatically post.

Running SQL Profiler, I found what I think are the three stored procedures involved. These are:

1) DYNAMICS.dbo.zDP_SY00800SI

2) dbo.glpCreatePostingActivity

3) SCHLD.dbo.glpBatchCleanup

Will calling these three stored procedures be all that is needed?

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

    Hi Richard

    No, the stored procedures are not enough to correctly post transactions. There is a heap of Dexterity code that runs before and after the call to stored procedure.

    That's exactly why I created the Batch Posting Service Toolkit, which can be called by VS Tools code, Dexterity code or as a Service Based Architecture (SBA) Web Service.

    BPST wraps all the Dexterity bits into a single simple API.

    Regards

    David

  • Richard Wheeler Profile Picture
    75,852 Moderator on at

    Thanks Dave, I have downloaded build 12 for 18.2 and will attempt to incorporate into my C# code.

  • Flashjunior Profile Picture
    10 on at

    Please can you share with me the stored procedure you used to create a bank transfer batch, I really need to import bank transfer records into GP2018

  • Richard Wheeler Profile Picture
    75,852 Moderator on at

    I have invested over two weeks trying to get this completely working. Right now I am stuck getting the batch to post. My program reads from an Excel spreadsheet. Let me get this finished.

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

    Hi Richard

    Capture the script log and that will give you the parameters to post the batch.

    You will not be able to cancel the reports as this required some Dexterity only hacking in the runtime engine that you will not be able to do from visual studio tools. It took me many weeks of development to make it work.

    Your time is worth more than the $600 cost of Batch Posting Service Toolkit.

    Regards

    David 

  • Richard Wheeler Profile Picture
    75,852 Moderator on at

    Yes, but then I need to install Web Services and run IIS on the server. Too much over head just to post batches.

  • Richard Wheeler Profile Picture
    75,852 Moderator on at

    By the way, the sample code does successfully post the SOP batch so it can be done. I just need to figure out the correct parameter values to send down to

               Dynamics.Forms.Batch.Procedures.Post.Invoke(BatchSource, batchNumber, nWindowType, nActivityType, DestID, ref nStatus);    

    I have BatchSource = "GL_Entry"

    batchnumber is the batch ID

    nWindowType 2 or 3

    nActivityType 2 or 3.

    I can live with the journal printing to the screen.

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

    Hi Richard

    If you only want to call Batch Posting Service Toolkit from a VS Tools Addin. You don't need IIS and SBA set up.

    You only need IIS and SBA if you want to call it via a web service.

    You can call BPST from Dexterity, C#, VB.Net or GP Power Tools just by installing it.

    Regards

    David 

  • Richard Wheeler Profile Picture
    75,852 Moderator on at

    David, I just successfully posted my first ledger batch without any edit list appearing on the screen or printing. It was quite the challenge not only finding the method but the parameters to pass to it. I cannot believe there is no documentation for this. I am going to do some routine testing over the weekend and submit this to user acceptance testing. I may or may not need BPST. It is good to know that it is there.

  • Suggested answer
    Andrew John Dean Profile Picture
    1,337 on at

    Hi Richard

    I have been monitoring your discussion with David and see that you have figured out how to use VST to post batches.

    There is just one area of VST logic that I need to make you aware of. If you are simply calling the posting function as a one-shot routine after importing transactions from a spreadsheet, then your code will work successfully  

    If however, you are running in a continuous timer loop, GP will eventually crash after about 10-20 batches being posted. Hope this information doesn’t come as “rain-on-your-parade”

    Regards
    Andrew Dean

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 671

#2
André Arnaud de Calavon Profile Picture

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

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 589 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans