Monday, April 27, 2015

Settlement issue in AX2012R3

After I done the data migration from AX2012FP to AX2012R3 customer realize that there are some issues in the settlements some of them are not appearing in the Settle Open Transactions and others are not not appearing either in the Settle Open Transactions or Closed Transaction Editing then i found the solve the issue after using the below SQL script and I found the transactions appearing in Settle Open Transactions then you can settle your transactions

SET              APPROVED = 1, SETTLEMENT = 0

Thursday, March 19, 2015

MS Dynamics GP2013 R2: Error the selected company is not configured of the current MS Dynamics GP System database

After restore a database from company A to company B open SQL management then under B database open SY00100 table then correct the CMPANYID and your company ID is located under DYNAMICS.db in SY01500 table.

Tuesday, March 17, 2015

Restore AX db Backup From Another Domain "Log in Failed to Microsoft Dynamics AX 2012FP, R2 and R3"

1. Give the domain user access to the database(s), it should be the same user added in the service log in.
2. Open the command and type "wmic path win32_useraccount where name="{Domain user name Same user used in step 1}".
3. Open USERINFO table and add the result of SID from the first step, change the NETWORKDOMAIN and NETWORKALIAS for the "Admin" user only.

Monday, November 17, 2014

MS Dynamics GP: This contract is being used by another user.

1. Let all users log off from GP.
2. Try to access the same contract, if you still getting the same error run the below script

Open SQL Management Studio then run the below script against the company database

Select * 
From PA000001 

Then run the below script 

Delete PA000001 

Thursday, July 17, 2014

Maximum stored procedure, function, trigger, or view nesting level exceeded

While upgrade from GP10.0 SP2 to GP10.0 SP5 and running the GP utilities i got the below error 

CREATE TRIGGER [dbo].[zDT_MC40200U] ON [dbo].[MC40200] AFTER UPDATE 
set nocount on
FROM dbo.MC40200, inserted 

set nocount off
Invalid Column Name DEX_ROW_TS

I've created this column manually in Dynamics.dbo.MC40200 then re-run the utilities and it has been passed. 

Sunday, June 8, 2014

How To Reset MS Dynamics GP System Password

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

Msg 2812, Level 16, State 62, Line 1 Could not find stored procedure 'run'.

while running that script "run DBCC CHECKDB" i got the above error to solve it create the following stored procedure and re-run the script again.


An inconsistency was detected during an internal operation in database 'tempdb'

Also if you lost the "Tempdb" tables, all what you have to do is restart the SQL server as the Tempdb" tables created each time you restarting the SQL server.

Monday, March 31, 2014

This Document Number has been used- Billing- MS Dynamics GP

First you have to delete the document number in RM00401 and run the following script:

Delete PA13100 where PADocnumber20 = 'XX'
Delete PA13200 where PADocnumber20 = 'XX'
Delete PA13202 where PADocnumber20 = 'XX'
Delete PA10802 where PADocnumber20 = 'XX'
Delete PA01901 where PADocnumber20 = 'XX'

Wednesday, February 26, 2014

Tuesday, February 25, 2014

Mohammed Tohamy : Deploy the default reports AX 2012

Mohammed Tohamy : Deploy the default reports AX 2012: 1.        Open Microsoft Dynamics AX 2012 Management Shell from Administrative Tools                      I.                         C...

Wednesday, January 29, 2014

Deploy the default reports AX 2012

1.       Open Microsoft Dynamics AX 2012 Management Shell from Administrative Tools

                     I.                        Click Start > Administrative Tools.
                    II.                        Right-click the Microsoft Dynamics AX 2012 Management Shell option.
                  III.                        Click Run as administrator.

2.       Retrieve a list of the reports that are included with Microsoft Dynamics AX, and store the list in a local variable by entering the following command:

Windows PowerShell
      $reports = Get-AXReport -ReportName *
3.  View the list of reports by entering the following command:

Windows PowerShell

4.       To deploy all reports, enter the following command:
Windows PowerShell
Publish-AXReport –ReportName *

5.       To deploy two or more specific reports, enter the names of the reports. For example, to deploy the CustTransList and CustTransOpenPerDate reports, enter the following command:
Windows PowerShell
Publish-AXReport -ReportName CustTransList, CustTransOpenPerDate

Error While Installing AX2012 R2


The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. (Exception from HRESULT: 0x80070422)


It's the windows update service is disabled, enable it and error will be resolved.

Thursday, January 23, 2014

AX 2012 R2 Reports Deployment Errors


You do not have privileges to deploy to server: "Server Name". For deployment, you must have administrative rights to the SQL Server Reporting Services (SSRS) server. Contact your administrator to deploy.


Try the following command while publishing the default reports

For All Reports : "Publish-AXReport -ReportName * -SkipReportServerAdminCheck"

For Single Report : "Publish-AXReport -ReportName CustTransList -SkipReportServerAdminCheck"

Monday, June 17, 2013

Adjust the cost for a posted Sales, Purchasing or inventory transactions in MS Dynamics GP

If you facing a problem in your inventory costing you can apply the following scenario  but only if your valuation methods are (FIFO Perpetual, LIFO Perpetual and Average) 

Go to MS Dynamics GP>>Tools>>Utilities>>Inventory>>Adjusts Costs

Then enter the item ID and the "posted" transaction date as well and change the item cost and the system will create GL transaction for the variance cost.

Dynamics GP 2010 Utilities error "The Microsoft SQL Server database compatibility level for your Microsoft Dynamics GP databases is not supported. Change the compatibility level to SQL Server 2005 or later, refer to KB article 2399690"

The database compatibility level of one or more Microsoft Dynamics GP databases is not set to SQL Server 2005 (90) or SQL Server 2008 (100). This is a new requirement starting with Microsoft Dynamics GP 2010 Service Pack 1.

Change the database compatibility level of all Microsoft Dynamics GP databases to SQL Server 2005 (90) if running Microsoft SQL Server 2005 or to SQL Server 2008 (100) if running SQL Server 2008.

IMPORTANT NOTE: If an integrating application or customization requires the database compatibility to be something other than SQL Server 2005 (90) or SQL Server 2008 (100), change the database compatibility temporarily for the Service Pack 1 installation and then change it back to the required setting. Please be aware that this process will have to be performed for every hotfix and service pack installation following Service Pack 1 if the compatibility level is set back to a version older than SQL Server 2005 (90).

Perform the following steps:

1. At the Microsoft SQL Server, click Start, click All Programs, click Microsoft SQL Server 2005 or Microsoft SQL Server 2008, and then click SQL Server Management Studio.

2. Login to your Microsoft SQL Server as the sa user.

3. In the Object Explorer area, expand Databases.

4. Right-click the DYNAMICS database and then click Properties.

5. In the Select a page area, click Options.

6. Click to select the drop down list next to Compatibility level and then select SQL Server 2005 (90) if running Microsoft SQL Server 2005 or select SQL Server 2008 (100) if running Microsoft SQL Server 2008.

7. Click OK.

8. Repeat Steps 4-7 for each Microsoft Dynamics GP company database.

9. Start Microsoft Dynamics GP 2010 Utilities to continue the service pack installation.

Wednesday, April 10, 2013

How to delete a company in MS Dynamics GP

You have to delete the company in GP first then from the database from SQL.

1. MS Dynamics GP Menu>>Tools>>Utilities>>System>>Delete Company.
2. Enter the system password if necessary.
3. Open the lookup then select the company that you want to delete.

by this you just deleted the company from GP only

4. Open the SQL management studio.
5. Open the databases.
6. Right click on the database you want to remove and click delete.

Tuesday, April 9, 2013

MS Dynamics GP:- This batch is being posted by another user

You get this message even though nobody is logged in to the database so that it's impossible for the batch to be being posted by somebody else. What to do?
  1.  Back up the DYNAMICS and company databases.
  2. Change the batch status so that it no longer thinks it's being posted.


Monday, March 18, 2013

Windows 2008 Server R2 Enterprice: Joining my existing domain

I attempted to join my existing domain with this server being a member server, and received a message:

An attempt to resolve the DNS name of a DC in the domain being joined has failed. Please verify that this client is configured to reach a DNS server that can resolve DNS names in the target domain.

I actually know how to fix this, I think... when configuring IP addresses, I didn't put the local address of my domain controller in as one of the DNS possibilities. Once this change was worked.

Tuesday, October 16, 2012

Journal entry "number" has been entered in another window


The BACHNUMB and BCHSOURC fields was missing in GL10000.


1. Call the journal entry number from GL10001.
2. Copy batch ID from BACHNUMB and past in the BACHNUMB field in GL10000.
3. Mostly the BCHSOURC is GL_Normal.

Monday, October 1, 2012

You cannot complete this process while transactions are being edited

When you attempt to reconcile Inventory Control in Microsoft Dynamics GP, you receive the following message.

You cannot complete this process while transactions are being edited.


You may have a user locked in a table even though all users are logged out.


1. Have all users exit Microsoft Dynamics GP and execute the following query in the SQL Query Tool against the DYNAMICS database: 

delete SY00800

2. Execute the following queries against the Tempdb database: 

delete DEX_LOCK 


3. Run this script 


  • Microsoft Dynamics GP 2010
  • Microsoft Dynamics GP 10.0
  • Microsoft Dynamics GP 9.0, when used with:
    • Inventory Control

Saturday, September 29, 2012

The server principal "sqlLoginName" is not able to access the database "myDatabaseName" under the current security context.

Description of the issue: When you restore a backup database to another server, you may encounter the error message below when you try to connect.

Msg 916, Level 14, State 1, Line 1The server principal "mtohamy" is not able to access the database "TWO" under the current security context.

Cause: When you restore a backup database to another server, you may experience a problem with orphaned users. That is to say that the SID system view sysuser is not mapped to a SID syslogins existing.

Resolution: To detect orphaned users you can run the following command:
USE <TWO>sp_change_users_login  @Action='Report';

You can see that the SID does not match the system views: sys.sysusers and sys.syslogins
USE <TWO>SELECT sid FROM sys.sysusers WHERE name = 'mtohamy'SELECT sid FROM sys.syslogins WHERE name = 'mtohamy'

To correct this problem of connection between the server connection account specified by the user and <login_name> the database specified by <database_user>, you can run the following command.
USE <myDatabaseName>EXEC  sp_change_users_login @Action='update_one', @UserNamePattern='mtohamy',@LoginName='mtohamy';

This should be done to all the db(s)  that user is associated in.

SQL SERVER – Fix: Error: 15138 – The database principal owns a schema in the database, and cannot be dropped

The database principal owns a schema in the database, and cannot be dropped. (Microsoft SQL Server, Error: 15138)

 The reason for error is quite clear from the error message as there were schema associated with the user and that needs to be transferred to another user.

Let us assume that user was trying to delete user which is named as ‘mtohamy’ and it exists in the database ‘TWO’.
Now run following script with the context of the database where user belongs.
USE TWO;SELECT s.nameFROM sys.schemas sWHERE s.principal_id USER_ID('mtohamy');
In my query I get following two schema as a result.

Now let us run following query where I will take my schema and and alter authorization on schema. In our case we have two schema so we will execute it two times.
ALTER AUTHORIZATION ON SCHEMA::db_denydatareader TO dbo;ALTER AUTHORIZATION ON SCHEMA::db_denydatawriter TO dbo;
Now if you drop the database owner it will not throw any error.
Here is generic script for resolving the error:
SELECT s.nameFROM sys.schemas sWHERE s.principal_id USER_ID('mtohamy');
Now replace the result name in following script:

Wednesday, February 29, 2012


I was trying today to install MS Dynamics GP2010 @ customer development server while I'm creating Dynamics.db when the system was loading the "Load Required Data" step exactly when system was loading the "syExcelReports.fmt" I got error and couldn't complete the installation also GP utility has been closed then I copied my "Install.dll" from my machine and replace it @ the customer program files under C:\Program Files\Microsoft Dynamics\GP2010\SQL\0 then I run the utility again and it has been passed successfully.
FYI I've uploaded the "Install.dll" @

Monday, January 16, 2012

Activate Analytical Accounting Manually

The case after installing and configuring the AA normally I noticed that the AA is not activated at the company and after investigation I activated it Manually from the Dynamics.db open AAG00104 then select the company and modify the aaCompanyStatus to 4 then you will find the AA is activated at the relevant database.
But don’t forget to backup your databases before  :)

Sunday, January 15, 2012

Error message when you try to post a journal entry that contains Analytical Accounting assignments in Microsoft Dynamics GP : "Cannot insert the value NULL into column 'aatrxsource' table"

This problem occurs because an Analytical Accounting record is missing in the SY01000 table.
Run the following script in an appropriate SQL query tool against the company database.
insert into SY01000 VALUES (0,2,0,'Analytical Accounting','AATRX',1,'')
Wish it will help.
Mohammed Tohamy