This is a quick video to show you how to Import and Export objects from Dynamics NAV. This process enables you to install changes that may have been made by your partner or somebody else in your organization.

To do that process we have to launch the Development Environment, and the Development Environment is not the same as the Role Tailored Client. This process cannot be done from the web client or the SharePoint client or anything else. It has to be done from the Development Environment. Once you load that, you want to launch Object Designer. From Object Designer, you're going to choose File, Import, and then you will simply choose the import file that contains the objects that you're trying to load. In this case, I'm going to choose one called 1173 Partial.

When it starts the import of the objects--depending on the objects, and on the version of your current objects, it may prompt you to open the Import Worksheet. Sometimes it may prompt you to skip the Import Worksheet. NEVER skip the Import Worksheet. ALWAYS open it. Always open the Import Worksheet prior to this. Then choose OK. This brings up the Import Worksheet. It then shows you the objects that it is getting ready to install, and it shows by type. Here you can see we have Table, Report, Code Unit, Menu Suite, and Pages.

For each object I highlight, down at the bottom, it will tell me what my current version is, the existing version and  what the new version is--including the date and time stamp. This is helpful because I want to check each of these and make absolutely sure that what I am installing is more current, is equal or more up to date than my existing objects.

Another good piece of advice here is to always BACK-UP your existing objects before you import it. So once I go to this import worksheet, I should take note of all of these objects--I can copy and past that to Excel. Then I should cancel out of this, go back to my Object Designer and export every one of those objects. You can do that quickly by marking the individual objects across types. Choose Edit, Toggle Mark. Once you have marked all your edits, you can say View, Marked Only, and export that whole group. That makes the backup of your objects before you import them.

Once my backup is done, I'm going to go back to Import my file. Go back into the Import Worksheet--never skip that. Now I am ready to import them. Each object has an action, and this Action Column and it tells you what it is going to do. It might Replace or Merge Existing, Create or Delete. You always want to replace the Table Objects. So our advice is to click the Replace All button, and make sure that all rows show the action as Replaced. Once that is done, and after I have a backup of all my objects, then I simply hit OK, and it will go through and begin the Import.

Now, when Tables are involved, you will get this warning--and I think this is with NAV 2013 and later (with previous version--maybe 9, you will not get this warning). When Tables are involved, it's going to tell you that we want to update object's Table, and we are going to validate that data. Keep in mind that importing objects does not change or import your data. It's only the structure. Only objects create the business rule as an interface for NAV. It's not the data. So what this is saying is if the the table structure changes, I'm going to validate the data in those existing tables to make sure it is still good.

You have a couple of options here. You can do it Now, with validation, Later, or you can Force it. We recommend you do that Now, with Validation. That is going to make sure the new table structure fits the existing data. Once it imports those it says, "OK, I'm going to proceed and do this validations.  Do you want to?"  We're going to say Yes, and it will proceed to validate the data in the tables against my new objects. I'm 100% complete, and my Status is Operational. I Close and I'm done. I now get a summary that shows me what has happened, and my new objects are now installed.

If that validation process encounters an error, or gives you a warning that you may lose data, you need to think about how to handle that. You may have to go into Tables and clean them yourself before you can Import the new Table Object. An example of this might be, if the new Table Object deletes a field--and you have records in your current table that have data in that field--the validation process will warn you that it will not install. And it will say that if you import this object, we're going to lose data. So NAV was trying to protect you from ever losing data. And you would even need to go create a Batch Process Report and clean the data out of those fields or you can choose that option to Force it,  and it will truncate that data. We do not recommend that you Force it. We recommend that you clean that data up before you Import.

So once those objects are in, we are ready to go. For safety sake, it's a good idea to stop and re-start the application service. We definitely want to be out of the Role Tailored or the other client when you do this process. Again you should only have the Development Environment open. Once the import is done, you can launch your Role Tailored Client again, and you should see your new changes and new objects installed. That’s it.

Thanks for watching. If you have any questions, give us a call.

by TrinSoft, LLC a Microsoft Dynamics NAV Partner in Kentucky