Saturday, 4 July 2015

eConnect Integration Service Not Running

While I was working on the series of posts for how to install the Web Services for Microsoft Dynamics GP, I encountered a couple of problems which I thought it might be worth covering in this and the next post.
The first was to do with the eConnect Integration Service which is installed as part of the install of Web Services. The basic problem was that the service was not running;
Services - eConnect for Microsoft Dynamics GP 2013 Integration Service
When I tried to manually start the service I got this error message;
Services - The eConnect for Microsoft Dynamics GP Integration Service service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.The eConnect for Microsoft Dynamics GP Integration Service service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.
In this case, I know the service should always be running and doesn’t stop automatically so there is a problem. I opened Event Viewer to check if any errors were being raised;
Event Viewer >> Windows Logs >> Application
I opened one of the listed errors to see the details but unfortunately there wasn’t a great deal more detail;
Event Properties - Event 18, System.ServiceModel 4.0.0.0
However, the “WMI provider was not registered” is usually a permissions issue. So to increase the permissions of the account being used to run the eConnect Service, I opened resolve the Local Users and Groups manager from Control Panel and selected the Administrators group;
lusrmgr - Local Users and Groups (Local)
I added the account being used for eConnect (DOMAIN\srvc.gpweb.app) to the Administrators group and clicked OK to save the update;
Administrators Properties
Back in Services I was able to start the eConnect for Microsoft Dynamics GP 2013 Integration Service without error;
Services

Thursday, 2 July 2015

Dynamics GP 2010 Web Services Installation - The Security ID structure is invalid

Solution:

            To resolve this error, we need you to go into SQL Server Management Studio and go to the Databases | Expand out the System Databases | Model database | Security folder | Users. Remove any SQL accounts that exist here. After Web Services is installed, you can go ahead and add the accounts back.

How to reset Dynamics GP System Password

UPDATE DYNAMICS..SY02400 SET DMYPWDID=1,PASSWORD = 0x00202020202020202020202020202020

How to write Insert Trigger for SQL Table

CREATE TRIGGER triggername
ON TableName
AFTER INSERT
 AS
 BEGIN

          Write your query here...

END

rdlc function

Public Function functionname(ByVal val as String) As String
   Dim reternval as String = ""


 If (val = "Condition1")
          reternval = "Result"
 Else If (val = "Condition2")
        reternval = "Result"
Else If (val = "Condition3")
       reternval = "Result"
Else If (val = "Condition4")
      reternval = "Result"
Else If (val = "Condition5")
     reternval = "Result"
Else If (val = "Condition6")
      reternval = "Result"
Else
     reternval = "Result"
End If

   Return reternval

End Function

Vba package is logged in dynamics gp

Solution 1:


To unlock the VBA project, follow these steps:

Start Microsoft Dynamics GP, and then start the VBA editor by going to Tools, click Customize, and then click Visual Basic Editor.

After you are in the VBA editor, open the project that contains the modified windows that you are trying to export.

As soon as you open it, you will receive a password prompt. Enter the password, and then click OK.

After you are in the project, you have to unlock it before you can export. To unlock it, follow these steps:

Locate Tools, and then select [Project name] Properties, where [Project name] is the name of the locked project.

As soon as the Properties window opens, click the Protection tab, and then click to clear the Lock project for viewing check box.

Click OK, save your project, and then exit the VBA editor.

After you are back in Microsoft Dynamics GP, you will be able to export your Forms with VBA.




Solution 2:


If the VBA project is not password protected, check the references in the Visual Basic Editor to see whether references are missing for the VBA

project. To check the references, follow these steps:

In Microsoft Dynamics GP, start the Visual Basic Editor. To start the Visual Basic Editor, click Tools, click Customize, and then click Visual Basic Editor.

In the Project Explorer window, select the VBA project.

Click Tools, and then click References.

Scroll through the list of references, and determine whether any references display missing.

Click to clear any references that display missing.

Close the References window, and then exit the Visual Basic Editor.

Click Tools, click Customize, click Customization Maintenance, and then export the package file.

Dexterity shared components not detected


Solution:
       
          The installation is failing because GP 10.0 doesn't work with Dexterity shared components 11.0, which is used with GP 2010.   If you browse to the bin folder of your download/media, then open the DexCmn folder and install the Dexterity shared components 10.0.  Your error should go away.

The INSERT statement conflicted with the CHECK constraint

ISSUE:

         Microsoft.Dynamics.GP.eConnect.eConnectException: The INSERT statement conflicted with the CHECK constraint "CK__POP10100__CREATD__0618D7E0". The conflict occurred in database "TWO", table "POP10100", column 'DOCDATE'.
The statement has been terminated.


SOLUTION:

                   
                    You have to declare date field in below format.

                    DOCDATE = DateTime.Now.Date.ToString();

GetNextPONumber in Dynamics GP Econnect

Below is sample code for creating custom Web Service using eConnect for Next PONumber.

public static string nextponumber = string.Empty;

string sConnectionString = @"data source=datasource;initial catalog=TWO;integrated security=SSPI;persist security info=False;packet size=4096";

GetNextDocNumbers myDocNumbers = new GetNextDocNumbers();

nextponumber = myDocNumbers.GetNextPONumber(IncrementDecrement.Increment, sConnectionString);