Including custom and hang-off entities in the data sync template for master data

The standard Data Sync templates can be extended to provide information from the custom or hang-off tables.

About this task

Procedure

  1. Copy the correct template from the install_dir/repository/xapi/template/merged/resource directory into the install_dir/extensions/global/template/resource directory.
  2. Add the XMLName for the custom or hang-off entity into the new file.
    1. When the custom table has a one-to-one relationship with its parent.

      For example, consider HF_Pricelist is a hang-off of the YPM_Pricelist_Hdr table. The PriceListSyncTemplate appears as follows:

      <?xml version="1.0" encoding="UTF-8"?>
      <PricelistHeader>
         <PricelistAssignmentList>
           <PricelistAssignment>
             <Extn/>
           </PricelistAssignment>
         </PricelistAssignmentList>
         <PricelistSellerAssignmentList>
           <PricelistSellerAssignment>
             <Extn/>
           </PricelistSellerAssignment>
         </PricelistSellerAssignmentList>
         <Extn/>
      </PricelistHeader>

      The modified template would appear as follows:

      <?xml version="1.0" encoding="UTF-8"?>
      <PricelistHeader>
         <HFPricelist/>
         <PricelistAssignmentList>
            <PricelistAssignment>
               <Extn/>
            </PricelistAssignment>
         </PricelistAssignmentList>
         <PricelistSellerAssignmentList>
           <PricelistSellerAssignment>
              <Extn/>
           </PricelistSellerAssignment>
         </PricelistSellerAssignmentList>
         <Extn/>
      </PricelistHeader>
    2. When the custom table has a one-to-many or a zero-to-many relationship with its parent.

      For example, consider HF_Custom_Price_Data is a hangoff of the YPM_Pricelist_Hdr table and defines a relationship to YPM_Pricelist_Hdr whose cardinality is set to "OneToMany". In this case, the template needs to be extended using the ChildListXMLName defined in the relationship, and the ChildXMLName listed inside that element. The PriceListSyncTemplate appears as follows:

      <?xml version="1.0" encoding="UTF-8"?>
      <PricelistHeader>
         <PricelistAssignmentList>
           <PricelistAssignment>
             <Extn/>
           </PricelistAssignment>
         </PricelistAssignmentList>
         <PricelistSellerAssignmentList>
           <PricelistSellerAssignment>
             <Extn/>
           </PricelistSellerAssignment>
         </PricelistSellerAssignmentList>
         <Extn/>
      </PricelistHeader>

      The modified template would appear as follows:

      <?xml version="1.0" encoding="UTF-8"?>
      <PricelistHeader>
         <CustomPriceDataList>
            <CustomPriceData/>
         </CustomPriceDataList>
         <PricelistAssignmentList>
            <PricelistAssignment>
               <Extn/>
            </PricelistAssignment>
         </PricelistAssignmentList>
         <PricelistSellerAssignmentList>
           <PricelistSellerAssignment>
              <Extn/>
           </PricelistSellerAssignment>
         </PricelistSellerAssignmentList>
         <Extn/>
      </PricelistHeader>
  3. Build and deploy your extensions.