In this procedure an example of defining an object to encapsulate the files being transferred and attached to other objects within the mobile application is provided. The primary focus of this procedure is on the external data property that references the file. Additionally, the overall architecture and components of the file object are explained during this procedure, including the reasons for their implementation and how they may be used in related functionality.
The sample application to be used in this procedure is Mobile Northwind, which contains the module data structure of Customers -> Orders -> OrderItems. Added to this structure will be a collection property for the Document object that is defined. This will be added as child to the Customer object, making it a sibling of the Orders in the aforementioned module data structure.
With the complete of this procedure the object to encapsulate the files associated with (or “attached to”) some other object has been defined. The parent object has been defined to contain a collection of these objects, which is to be populated during synchronization and also when files are attached on the client device.
The next area of functionality to implement is the downstream synchronization processing. See the procedure on this topic for guidance on this procedure.