How to clean up Navision Database

rsridhar75rsridhar75 Member Posts: 12
Hi,

I am using Demo version of Microsoft Dynamic NAV 4.0. I want to know how can i create a fresh database of Navision? In other words, how to clean up a database? For example, i want all the records in the existing Cronus International database to be deleted and create my own Chart of Accounts, Posting Groups, Dimensions, Customers, Item, Vendors, Sales Invoice etc... Is it possible? I tried creating a new database. It creates only 9 tables (User, Member Of, Users Role, Permission, Company, Windows Access Control, Windows Login, User Menu Level, Database Key Groups).

Thanks in Advance.
Regards,

Sridhar R

Comments

  • tinoruijstinoruijs Member Posts: 1,226
    Easiest way to start is creating a new company in the CRONUS database.
    Then you'll will have all objects available.

    Take a look in NAV help and search for "create company". There you also will find the difference between native and sql-databases.

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • MalajloMalajlo Member Posts: 294
    Try this: (modify/add tables, ending of code is not included! It is quite long code)
    OBJECT Report 90101 Dealer Delete postings
    {
      OBJECT-PROPERTIES
      {
        Date=26.09.07;
        Time=13:31:04;
        Modified=Yes;
        Version List=SI1.20NSC,ALX;
      }
      PROPERTIES
      {
        Permissions=TableData 17=rimd,
                    TableData 21=rimd,
                    TableData 25=rimd,
                    TableData 32=rimd,
                    TableData 36=rimd,
                    TableData 37=rimd,
                    TableData 38=rimd,
                    TableData 39=rimd,
                    TableData 43=rimd,
                    TableData 44=rimd,
                    TableData 45=rimd,
                    TableData 46=rimd,
                    TableData 50=rimd,
                    TableData 86=rimd,
                    TableData 87=rimd,
                    TableData 96=rimd,
                    TableData 110=rimd,
                    TableData 111=rimd,
                    TableData 112=rimd,
                    TableData 113=rimd,
                    TableData 114=rimd,
                    TableData 115=rimd,
                    TableData 120=rimd,
                    TableData 121=rimd,
                    TableData 122=rimd,
                    TableData 123=rimd,
                    TableData 124=rimd,
                    TableData 125=rimd,
                    TableData 131=rimd,
                    TableData 132=rimd,
                    TableData 169=rimd,
                    TableData 203=rimd,
                    TableData 211=rimd;
        ProcessingOnly=Yes;
        OnPreReport=BEGIN
                      IF NOT CONFIRM('Are you sure you want to delete all postings in current company?',FALSE)
                       THEN ERROR('Postings not deleted!');
                      IF NOT CONFIRM('are you realy sure you want to DELETE ALL POSTINGS?!?',FALSE)
                       THEN ERROR('Postings not deleted!');
                    END;
    
        OnPostReport=BEGIN
                       MESSAGE('Postings deleted')
                     END;
    
        HorzGrid=210;
      }
      DATAITEMS
      {
        { PROPERTIES
          {
            DataItemTable=Table17;
            DataItemTableView=SORTING(Entry No.);
            OnPreDataItem=BEGIN
                            DELETEALL;
                          END;
    
          }
          SECTIONS
          {
          }
           }
        { PROPERTIES
          {
            DataItemTable=Table21;
            DataItemTableView=SORTING(Entry No.);
            OnPreDataItem=BEGIN
                            DELETEALL;
                          END;
    
          }
          SECTIONS
          {
          }
           }
        { PROPERTIES
          {
            DataItemTable=Table25;
            DataItemTableView=SORTING(Entry No.);
            OnPreDataItem=BEGIN
                            DELETEALL;
                          END;
    
          }
    
  • selece28selece28 Member Posts: 316
    Hi,
    Are you sure this clean all posting/transaction records.
    I also having the same problems. Sometimes need to only clean transaction records but leaving the Master records.

    If you want a new clean database, just create a new company the backup that company.

    Create a new Database the Restore those backup and you have yourself a clean database.
    ______________

    Regards,
    Steven
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Malajlo wrote:
    Try this: (modify/add tables, ending of code is not included! It is quite long code)

    ](*,) which part of "Demo Version" did you miss? =;
    David Singleton
  • diptish.naskardiptish.naskar Member Posts: 360
    I have never seen such a nice way to clean the the db using the code [-X ..Malajlo..have you ever tried the code in any of the database. :?:
    Diptish Naskar
    For any queries you can also visit my blog site: http://msnavarena.blogspot.com/
  • filexfilex Member Posts: 4
    Hi.

    Supose, i have a database with one enterprise.
    I'd been configured this enterprise.

    the client test the enterprise with customers, sales, ...

    Now, I want to create a second enterprise, but with same configuration that first (chart of accounts, posting groups...). (only delete customers,vendors, ...)

    It's possible?

    Thanks
  • DaveTDaveT Member Posts: 1,039
    Hi,

    The easiest way is to use the RIM tools. This has a data cleaning codeunit to clear out tranactions - which you may want to modify to include tables like sales orders.

    Don't forget to run a test database afterwards to clean out unused data :wink:
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • tinoruijstinoruijs Member Posts: 1,226
    DaveT wrote:
    Hi,

    The easiest way is to use the RIM tools. This has a data cleaning codeunit to clear out tranactions - which you may want to modify to include tables like sales orders.

    Don't forget to run a test database afterwards to clean out unused data :wink:

    Hi Dave,

    Could you give the object ID of the cleaning codeunit?
    Where can I find the RIM tools? Thanks.

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • SobyOneSobyOne Member Posts: 20
    #1. RIM tools are flaky.
    #2. You should NEVER delete transactional data from Navision.
    - There are unlabeled tables that you will not find and your go-live will fail.
    #3. Use the "Setup Checklist" feature to copy the setup into a new company.

    Please contact me if you need more help, #3 is a simple process.
    _\~ () ]3 `/ () |\| [-
    http://www.SobyLand.com
    651-815-0698
  • idiotidiot Member Posts: 651
    I've been deleting records from the backend using SQL statements.
    Just let it run through the list of tables that requires emptying.
    Going through in Navision will require a lot of efforts due to the OnDelete validation, the order of deletion is troublesome & time wasting.
    NAV - Norton Anti Virus

    ERP Consultant (not just Navision) & Navision challenger
  • DaveTDaveT Member Posts: 1,039
    Hi Tino,

    The codeunit ID is 8604 and is in the RIM toolkit which you can get on partnersource. Latest US version....
    https://mbs.microsoft.com/partnersource ... page=false
    If you search for RIM you'll get white papers etc


    Hi Sobyone

    I have used the RIM tool on many occasions and agree that it can be flaky on patching data but for filling master data it's very quick as most customer present you with data on Excel anyway. I have modified the 8604 codeunit depending on the situation on what I need cleared out but as long as you solve all your test database issues, I have not encountered a problem.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • tinoruijstinoruijs Member Posts: 1,226
    DaveT wrote:
    Hi Tino,

    The codeunit ID is 8604 and is in the RIM toolkit which you can get on partnersource. Latest US version....
    https://mbs.microsoft.com/partnersource ... page=false
    If you search for RIM you'll get white papers etc

    Thanks Dave!

    Tino Ruijs
    Microsoft Dynamics NAV specialist
Sign In or Register to comment.