Error message when you run Depreciation in Fixed Assets in Microsoft Dynamics GP: "Return Code 10"

This article has been archived. It is offered "as is" and will no longer be updated.
INTRODUCTION
This article contains the information to resolve "Return Code 10" errors in Fixed Assets in Microsoft Dynamics GP.


CAUSE

If the depreciation process was interrupted, a record may get locked in a table. So when you try to run depreciation again, this error message may happen due to the locked record. The steps below will help to clear the stuck record, but the user will have to investigate further why the depreciation process hung or was interrupted in the first place. 
More information
These steps require you to run update scripts through the Microsoft SQL Server query tool. We recommend that you create a backup of your data before you follow these steps.
  1. Have all users exit Microsoft Dynamics GP.
  2. Start the Support Administrator Console, Microsoft SQL Query Analyzer, or SQL Server Management Studio. To do this, use one of the following methods depending on the program that you are using.

    Method 1: For SQL Server Desktop Engine

    If you are using SQL Server Desktop Engine (also known as MSDE 2000), start the Support Administrator Console. To do this, click Start, point to All Programs, point to Microsoft Administrator Console, and then click Support Administrator Console.

    Method 2: For SQL Server 2000

    If you are using SQL Server 2000, start SQL Query Analyzer. To do this, click Start, point to All Programs, point to Microsoft SQL Server, and then click Query Analyzer.

    Method 3: For SQL Server 2005

    If you are using SQL Server 2005, start SQL Server Management Studio. To do this, click Start, point to All Programs, point to Microsoft SQL Server 2005, and then click SQL Server Management Studio.

    Method 4: For SQL Server 2008

    If you are using SQL Server 2008, start SQL Management Studio. to do this, click Start, point to All Programs, point to Microsoft SQL Server 2008, and then click SQL Server Management Studio.
  3. Run the following scripts against the company database when no users are in Microsoft Dynamics GP: 
    DELETE DYNAMICS..SY00800DELETE DYNAMICS..SY00801DELETE DYNAMICS..ACTIVITYDELETE TEMPDB..DEX_LOCKDELETE TEMPDB..DEX_SESSION
    These tables should be empty when all users are logged off. The delete statement is just to make sure that there are no stuck records in these tables.

    Run the following against the company database when no users are in Microsoft Dynamics GP: 
    Delete FAINDEXDelete FA40203Delete FA01500
    NOTE: The FAINDEX is re-created automatically when you use Fixed Assets.
  4. Click Microsoft Dynamics GP, point to Tools, point to Routines, point to Fixed Assets, and then click Depreciate. Verify that you can run depreciation without receiving an error message.
Properties

Article ID: 852559 - Last Review: 01/11/2015 06:10:23 - Revision: 5.0

  • kbnosurvey kbarchive kbprb kbtshoot kberrmsg kbexpertiseinter kbexpertisebeginner kbexpertiseadvanced kbmbsmigrate KB852559
Feedback