Show/Hide Toolbars

Additional Resources

Introduction > Integration with Microsoft Dynamics NAV > Integrator Guide for Connector for Microsoft Dynamics NAV > Codeunits for partner and callback functions > Codeunit 52101152

Function OpenXMLFile()

Scroll

This function first reads the header and then the line items.

Figure 16: Codeunit 52101152 (Function OpenXMLFile() )

Figure 16: Codeunit 52101152 (Function OpenXMLFile() )

The boolean value bRet determines whether or not there is an error. For example, a check is made to determine whether the article number has been filled in. If the article number is empty, the Quantity field cannot be saved. The quantity is written in the description and the import is rejected, as shown in figure 17.

Figure 17: Excerpt from Function OpenXMLFile() 

Figure 17: Excerpt from Function OpenXMLFile() 

Additional XML file fields must be programmed here, similar to the existing examples. Figure 18 shows an example of reading the quantity and saving in local variables.

Figure 18: Excerpt from Function OpenXMLFile() 

Figure 18: Excerpt from Function OpenXMLFile() 

The quantity is then validated, as described in figure 17. The validation sequence is important for the new fields. For example, a quantity cannot be validated if the article number has not been validated.

© 2024 Therefore Corporation, all rights reserved.