Creating an object extension

To create an object extension, complete the following steps:

  1. Decide what objects to extend and which events to use.

    Objects that inherit from the BusinessObject class can be extended. Refer to Dynamics GP Service Events for information about the events available for the Dynamics GP service.

  2. Determine the format for the XML element.

    If your extension will include additional data that will be passed along with the object, you must determine the format for the XML element that will contain this data. Remember that consumers of the service will need to process this XML element, so a simple structure is preferrable.

    For example, the following XML element is used in an extension for the Customer object. It contains contact history information for the customer.

    <ContactHistory>
    <FirstContactDate>6/6/1999 12:00:00 AM</FirstContactDate>
    <FirstContactSalesperson>NANCY B.</FirstContactSalesperson>
    <LastContactDate>3/1/2006 12:00:00 AM</LastContactDate>
    <LastContactSalesperson>ERIN J.</LastContactSalesperson>
    

</ContactHistory>

  1. Create the extension assembly.

    This assembly contains the processing code for the events that you are extending in the Dynamics GP service. Refer to Extension Assembly for details about creating this assembly.

  2. Register the events to process.

    Add entries to the BusinessObjectFile.config file so that the Dynamics GP service will process the additional events. Refer to Registering Events for more information.