The sample application uses classes from the Microsoft.Dynamics.GP.eConnect and Microsoft.Dynamics.GP.eConnect.Serialization assemblies.
The application uses the eConnectMethods class to instantiate an eConnectMethods object. The application uses the object’s CreateEntity method to create the customer. The CreateEntity method accesses the business objects on the server specified by the eConnect connection string.
The application uses several serialization classes to construct an eConnect XML document. To create an XML document, the application instantiates eConnectType, RMCustomerMasterType, and taUpdateCreateCustomerRcd objects.
The application first populates the taUpdateCreateCustomerRcd properties to specify the new customer. It uses the taUpdateCreateCustomerRcd object to populate the RMCustomerMasterType object. The RMCustomerMasterType then populates the eConnectType object. The eConnectType object represents a complete eConnect XML document.
The application writes the XML from the eConnectType object to a file. The application converts the XML contents of the file to a string and passes that string to the CreateEntity method.