Site Search:
Sign in | Join | Help
4Penny.net

Dynamics GP

Notes, Tips and Tricks on Developing in Dynamics GP

September 2007 - Posts

  • Logging actions before printing reports

    From a recent email:

    I have a stored procedure with a select statement that returns the info necessary to create an SOP invoice.  I currently use this stored procedure to create invoices in Crystal Reports and fax them out using Rockton’s DRM.  I would like to add to the stored procedure, so that every time it is ran, a note for the invoice printed is appended to a text field in collections management.  The notes in collections management are stored in cn00300 as text fields with the headers in cn20100.

    A:
    This is probably not work billing for… but I will if you make me.

    All you have to do is put an INSERT statement before the SELECT statement in the stored proc. Set

    SET NOCOUNT ON

    So that you don’t generate extemporaneous messages whilst doing this. Are you ok with the insert statement? If not, that might take an hour to develop, nothing more.

    Matter of fact, chew on this:
    For every report that you write, base it on a stored proc. For every stored proc that you write, insert into ‘myReportLog’ the name of the report, and the time that you run the report. Imagine how useful that would be when it came time to do maintenance or upgrade. You’d know which of your 20 reports are actually being used.

    I currently do this for several clients.
     

     

  • Removing old companies

    From a recent email:

    I'm upgrading a client from v8 to v10...they have four databases but two are "old" (never upgraded to v8 when previous VAR moved them).  I plan to drop these test databases and possibly make new ones BUT I want to remove the names from the login screen drop-down since nobody can access them anyway.  Do I remove those records from the DU00000000020 table or someplace else?  I am not sure...can try it on their test box but figured you might know.
     

    This isn't 'my area', but it sounds like you have two current companies, and two old ones. How about taking a good company, backing it up, and restoring it on top of the two 'bad' v8 companies. That'll give you four good companies. Then, you can remove them from the tools inside of Dynamics without worry.

    I'd only edit DU00000000020 or DYNAMICS..SY01500 as a last resort...

    I routinely get databases in the office from customers, to do VS Tools or eConnect work. I user DU00000000020 to find out what version the client needs to be to open up the db.

    Can't you also remove the name from the login dropdown by removing access to the company in security?

    HTH...

     


     
  • Error message when you start Microsoft Dynamics GP: "Dynamics

    SYMPTOMS

    When you start Microsoft Dynamics GP or Microsoft Business Solutions - Great Plains, you may receive the following error message: Dynamics SQL Database has not been setup for this version.

    CAUSE

     

    Cause 1

    This problem occurs because the values in the tables in the DYNAMICS database do not correspond to the version of Microsoft Dynamics GP or of Microsoft Business Solutions - Great Plains that you are using. See Resolution 1 in the "Resolution" section.

    Cause 2

    This problem occurs because the Client installation of Microsoft Dynamics GP was installed instead of the Server installation. You must install the Server installation before you can update the databases in Utilities. See Resolution 2 in the "Resolution" section.

    RESOLUTION

     

    Resolution 1

    1. Make sure that you have a good backup of the DYNAMICS database.
    2. Use Query Analyzer or SQL Management Studio to run the following script against the DYNAMICS database.
     SELECT * FROM DYNAMICS..DU000020
    SELECT * FROM DYNAMICS..DB_Upgrade 
    Notes
    In the results for the DU000020 table, verify that the values in the following columns correspond to the version of Microsoft Dynamics GP or of Microsoft Great Plains that you are using:
    The versionMajor column
    The versionMinor column
    For example, if you are using Microsoft Dynamics GP 9.0, you should see the following values:
    The versionMajor column: 9
    The versionMinor column: 0
    In the DB_Upgrade table results, verify that the values in the following columns correspond to the version of Microsoft Dynamics GP or of Microsoft Great Plains that you are using:
    The db_verMajor column
    The db_verMinor column
    The db_verOldMajor column
    The db_verOldMinor column
    For example, if you are using Microsoft Dynamics GP 9.0, you should see the following values:
    The db_verMajor column: 9
    The db_verMinor column: 0
    The db_verOldMajor column: 9
    The db_verOldMinor column: 0
    3. If the values in the columns that are listed in step 2 do not correspond to the version of Microsoft Dynamics GP that you are using, run the following scripts in Query Analyzer or in SQL Server Management Studio.

    Script 1

     
    update DYNAMICS..DU000020 
      set versionMajor = VERSIONMAJOR, versionMinor = VERSIONMINOR
      where companyID = COMPANYID
     
    Notes
    Replace the VERSIONMAJOR placeholder and the VERSIONMINOR placeholder with the numbers of the version that you are currently using. For example, if you are using Microsoft Dynamics GP 9.0, the VERSIONMAJOR placeholder should be 9 and the VERSIONMINOR placeholder should be 0.
    Replace the COMPANYID placeholder with the company ID of the company that has the incorrect version information. To determine the company ID, run the following statement.
     
    SELECT * FROM DYNAMICS..SY01500
     

    Script 2

     
    update DYNAMICS..DB_Upgrade 
      set db_verMajor = VERSIONMAJOR, db_verMinor = VERSIONMINOR
      where db_name = DATABASENAME
     
    Notes
    Replace the VERSIONMAJOR placeholder and the VERSIONMINOR placeholder with the numbers of the version that you are currently using. For example, if you are using Microsoft Dynamics GP 9.0, the VERSIONMAJOR placeholder should be 9 and the VERSIONMINOR placeholder should be 0.
    Replace the DATABASENAME placeholder with the name of the database for the company.

    Resolution 2

     

    Microsoft Dynamics GP

    If you are using Microsoft Dynamics GP, remove the Client installation and reinstall the Server installation. To do this, follow these steps:

    1. Click Start, click Control Panel, and then click Add or Remove Programs.
    2. On the list, select Microsoft Dynamics GP, and then click Change.
    3. Click Remove to remove the Client installation of Microsoft Dynamics GP.
    4. When you reinstall Microsoft Dynamics GP, click Server in the Installation Type window, and then click Next.
    5. Finish the installation.

    Microsoft Business Solutions - Great Plains

    If you are using Microsoft Business Solutions - Great Plains, convert the Client installation to a Server installation. To do this, follow these steps:

    1. Start the installation by using CD 1 of the Microsoft Business Solutions - Great Plains installation CD set. To do this, double-click the CDSetup.exe file.
    2. Click Install Great Plains, and then accept the same default settings that you used for the Client installation except for the following settings:
    a. At the Select to Install Server or Client window, click Server and Client Installation.
    b. At the Select Great Plains Components window, click SQL Server Objects.
    3. Finish the installation.

More Posts Next page »