Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Dynamics GP, posting batch won't start, can't close app normally

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

After switching the custom interface code to use GpConnect, the posting process won't start.  No progress dialog starts and the application needs to be terminated by the windows task manager.  The post process is waiting for something but there is no clue what that is. The GP message that displays when trying to close the app says that there is a process running and can't be closed.  After terminating and restarting, batch recovery successfully posts the batch.  The custom code keeps data in sync with an external database and runs before posting.  This worked fine before switching to GpConnect to access databases. 

The ‘Posting’ is successful if any of these are true:

   The batch is small (don’t know that the largest successful batch can be).

   GP is restarted between the Custom A/R batch transfer and the GP Posting.

In the DEX log the unsuccessful post is showing the last entry being:

…

/* Date: 10/01/2014 Time: 13:48:02

stmt(45320328):*/

BEGIN DECLARE @num int EXEC DYNAMICS.dbo.zDP_SY00800SI 2, 'sa', 'Test Company', 'RM_Sales', 'DGPI_RBL15', 1, '', @num OUT SELECT @num END

 

The successful post shows more activity:

…

/* Date: 10/01/2014 Time: 14:44:07

stmt(47303600):*/

BEGIN DECLARE @num int EXEC DYNAMICS.dbo.zDP_SY00800SI 2, 'sa', 'Test Company', 'RM_Sales', 'DGPI_RBL15', 1, '', @num OUT SELECT @num END

 

/* Date: 10/01/2014 Time: 14:44:08

stmt(47293096):*/

{CALL X3_56.dbo.zDP_RM40101F_1(NULL,NULL)}

 â€¦ more

Thanks, 

    Randy Leidich

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Dynamics GP, posting batch won't start, can't close app normally

    GPConnection

    This is what is being used to create connections to databases:

           /// Initiate SqlConnection with the use of the GPConnNet (Microsoft.Dextirity.GPConnection).

           ///

           /// This allows this application to connect to the desired database with the SQL Credentials

           /// associated with the current Great Plains user.

           internal static SqlConnection GPSqlConnection(string sGivenConnectionString)

           {

               var result = new SqlConnection(sGivenConnectionString);

               int resp = GPConnection.Startup();

               GPConnection gpConnObj = new GPConnection();

               gpConnObj.Init(GP_KEY_1, GP_KEY_2); // Provide License Keys to GPConnNet.dll

               SqlConnectionStringBuilder cb = new SqlConnectionStringBuilder(sGivenConnectionString);

               gpConnObj.Connect(result, cb.DataSource, Dynamics.Globals.UserId.Value, Dynamics.Globals.SqlPassword.Value);

               int fSuccess = (int)GPConnection.ReturnCodeFlags.SuccessfulLogin;

               if ((gpConnObj.ReturnCode & fSuccess) != fSuccess) { throw new Exception("Failure to Great Plains Connect\nReturnCode: " + gpConnObj.ReturnCode.ToString()); }

               return result;

           }

  • Frank Hamelly | MVP, MCP, CSA Profile Picture
    Frank Hamelly | MVP... 46,317 Super User 2025 Season 1 on at
    RE: Dynamics GP, posting batch won't start, can't close app normally

    What is GpConnect?

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,307 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans