Page 1 of 5612345678910...2025303540...Last »

SBA environment might not match Dynamics GP environment

David Meego - Click for blog homepageWhile testing Batch Posting Service Toolkit (BPST), a customer identified an issue with Inventory Posting.

When an inventory batch was posted from the Microsoft Dynamics GP client it would post to the General Ledger, however, a similar batch posted via Web Services and Service Based Architecture it would fail to post to GL.

After the initial double checking of my source code, I confirmed that the BPST code was correct and that the Post to GL checkbox on the Batch Header and the Post to GL Posting setting for inventory were being handled correctly.

Reviewing the source code for Dynamics I was able to locate the code in the IV_Post_Batch global procedure which decides if a batch will post to the GL.


if ('Post to General Ledger' of file SY_Posting_Journal_Settings) and
(IN_post_to_gl) and ('Module Loaded'[GL] of globals) and ('Module Registered'[GL] of globals) then
set l_POSTING_TO_GL to true;
end if;

You will note that it checks the IN_post_to_gl variable which is the Post to GL setting from the Batch Header table. It also checks the Post to GL setting from the posting setup table and finally checks that the GL module is loaded and registered.

We knew that the two settings from tables were correctly set as we had checked them and the batch would post to GL when posted from inside Dynamics GP using the BPST testing window.

So we realised that the problem must have been environmental. By that I mean that something was different between being inside Dynamics GP and making a web service call via Service Based Architecture. How could we check the values of the global variables without having to make a special BPST build?

Using GP Power Tools (GPPT) and its ability to create custom web services, we built a script to be called from a web service to return the values for ‘Module Loaded'[GL] of globals and ‘Module Registered'[GL] of globals. What we found was that ‘Module Registered'[GL] of globals was set to true, but ‘Module Loaded'[GL] of globals was false.

Adding the line ‘Module Loaded'[GL] of globals = true; into the BPST inventory posting code fixed the issue. But there is a bigger picture issue to be addressed.

As a developer writing code for Service Based Architecture, you cannot be sure that the SBA environment will match Dynamics GP environment. The environment is set up by the ServiceLogin global procedure and this script might not populate all the variables that would be initialized when the full client is executed.

I logged a bug with Microsoft to get the ‘Module Loaded'[] of globals array initialized in the future.

A final note, it is very unlikely that any of the 3rd party or ISV products have initialized their variables as they probably don’t trigger after the ServiceLogin script.

Hope you find this information useful.

David

This article was originally posted on http://www.winthropdc.com/blog.

Filed under: Batch Posting Service Toolkit, Development, Dexterity, Products, Service Based Architecture Tagged: Dexterity, SBA, Service Based Architecture

More:
SBA environment might not match Dynamics GP environment

March 7, 2016 · WinthropDC · No Comments
Tags: , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 64

SQL Script To Bulk Alter Users With Logins | azurecurve

Created by Ian Grieve of azurecurve|Ramblings of a Dynamics GP Consultant (http://www.azurecurve.co.uk) This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int). …. MVP Profile azurecurve Publishing azurecurve on the Dynamics Community Email azurecurve View azurecurve View Detailed RSS Feed View Ian Grieve’s about.me View azurecurve’s Feed on Twitter View Ian Grieve’s profile …

More:
SQL Script To Bulk Alter Users With Logins | azurecurve

February 9, 2016 · Ian Grieve · No Comments
Tags: , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 64

Find All Custom SQL Objects In Database | azurecurve

CREATE VIEW uv_AZRCRV_GetCustomObjects AS /* Created by Ian Grieve of azurecurve|Ramblings of a Dynamics GP Consultant (http://www.azurecurve.co.uk) This code is licensed under the Creative Commons … MVP Profile azurecurve Publishing azurecurve on the Dynamics Community Email azurecurve View azurecurve View Detailed RSS Feed View Ian Grieve’s about.me View azurecurve’s Feed on Twitter View Ian Grieve’s profile on LinkedIn View …

Read More:
Find All Custom SQL Objects In Database | azurecurve

February 3, 2016 · Ian Grieve · No Comments
Tags: , , , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 82

New Year eBook Sale at azurecurve Publishing | azurecurve

MVP Profile azurecurve Publishing azurecurve on the Dynamics Community Email azurecurve View azurecurve View Detailed RSS Feed View Ian Grieve’s about.me View azurecurve’s Feed on Twitter View Ian Grieve’s …

Visit site:
New Year eBook Sale at azurecurve Publishing | azurecurve

December 31, 2015 · Ian Grieve · No Comments
Tags: , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 102

SQL Trigger To Delete EFT Bank Information When … – azurecurve

… by Ian Grieve of azurecurve|Ramblings of a Dynamics GP Consultant (http://www.azurecurve.co.uk) This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int). … MVP Profile azurecurve Publishing azurecurve on the Dynamics Community Email azurecurve View azurecurve View Detailed RSS Feed View Ian Grieve’s about.me View azurecurve’s Feed on Twitter View Ian Grieve’s profile on …

Read this article:
SQL Trigger To Delete EFT Bank Information When … – azurecurve

December 15, 2015 · Ian Grieve · No Comments
Tags: , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 84

Physical Memory Error In VMware Workstation | azurecurve

MVP Profile azurecurve Publishing azurecurve on the Dynamics Community Email azurecurve View azurecurve View Detailed RSS Feed View Ian Grieve’s about.me View azurecurve’s Feed on Twitter View Ian Grieve’s …

View article:
Physical Memory Error In VMware Workstation | azurecurve

December 8, 2015 · Ian Grieve · No Comments
Tags: , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 84

Integration Manager eConnect Incorrect Address Or … – azurecurve

MVP Profile azurecurve Publishing azurecurve on the Dynamics Community Email azurecurve View azurecurve View Detailed RSS Feed View Ian Grieve’s about.me View azurecurve’s Feed on Twitter View Ian Grieve’s …

Read More:
Integration Manager eConnect Incorrect Address Or … – azurecurve

November 30, 2015 · Ian Grieve · No Comments
Tags: , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 54