Importing objects

Object Import is accessed through File | Import in the Object Designer. The import process is more complicated than the export process because there are more decisions to be made. When we import a compiled version of an object, the Object Designer allows decisions about importing and provides some information to help us make those decisions.

When we import a text version of an object, the new version is brought in immediately, regardless of what it overwrites and regardless of whether or not the incoming object can actually be compiled. The object imported from a text file is not compiled until we do so in a separate action. By importing a text-formatted object, we could actually replace a perfectly good production object with something useless.

Warning
Never import a text object until there is a current backup of all the objects that might be replaced.
Never send text objects to an end user for installation in their system.

When we import a compiled object from a .fob file, we will get one of two decision message screens, depending on what the Object Designer Import finds when it checks existing objects. If there are no existing objects that the import logic identifies as matching and modified, then we will see the following dialog:

Even though you have the option to proceed without checking further, the safest thing to do is always open the Import Worksheet, in this case, by clicking on the No button. Examine the information displayed before proceeding with the import.

If the .fob file we are importing is found to have objects that could be in conflict with existing objects that have been previously modified, then we will see the following format of message:

Of course, we can always click on Cancel and simply exit the operation. Normally, we will click on OK to open the Import Worksheet screen and examine the contents, as shown here:

While all of the information presented is useful at one time or another, usually, we can focus on just a few fields. The basic question, on an object-by-object basis, is "Do I want to replace the old version of this object with this new one?"

At the bottom of the preceding screenshot, we can see the comparison of the Existing object and the New object information. Use this information to decide whether or not to take an action of Create, Replace, or Skip. More information on using the Import Worksheet screen and the meaning of various warnings and actions can be found in the NAV Developer and IT Pro Help under Import Worksheet.

Although Import allows us to merge the incoming and existing table versions, only very sophisticated developers should attempt to use this feature. The rest of us should always choose the Import Action Replace or Skip, or Create, if it is a new object by clicking on the drop-down button as shown in the following screenshot:

When a .fob import completes, the system tells us the result:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset