code: private void writeUserFieldDefinitions()
     {
        for (CustomField cf : m_sortedCustomFieldsList)
        {
           if (cf.getFieldType() != null && cf.getFieldType().getDataType() != null)
           {
              UDFTypeType udf = m_factory.createUDFTypeType();
              udf.setObjectId(Integer.valueOf(FieldTypeHelper.getFieldID(cf.getFieldType())));
  
              udf.setDataType(UserFieldDataType.inferUserFieldDataType(cf.getFieldType().getDataType()));
              udf.setSubjectArea(UserFieldDataType.inferUserFieldSubjectArea(cf.getFieldType()));
              udf.setTitle(cf.getAlias());
              m_apibo.getUDFType().add(udf);
           }
        }
     }
docs: Add UDFType objects to a PM XML file.
  
  @author kmahan
  @date 2014-09-24
  @author lsong
  @date 2015-7-24