code: private void addUDFValue(FieldTypeClass fieldType, FieldContainer container, Row row)
     {
        Integer fieldId = row.getInteger("udf_type_id");
        String fieldName = m_udfFields.get(fieldId);
  
        Object value = null;
        FieldType field = m_project.getCustomFields().getFieldByAlias(fieldType, fieldName);
        if (field != null)
        {
           DataType fieldDataType = field.getDataType();
  
           switch (fieldDataType)
           {
              case DATE:
              {
                 value = row.getDate("udf_date");
                 break;
              }
  
              case CURRENCY:
              case NUMERIC:
              {
                 value = row.getDouble("udf_number");
                 break;
              }
  
              case GUID:
              case INTEGER:
              {
                 value = row.getInteger("udf_code_id");
                 break;
              }
  
              case BOOLEAN:
              {
                 String text = row.getString("udf_text");
                 if (text != null)
                 {
                    // before a normal boolean parse, we try to lookup the text as a P6 static type indicator UDF
                    value = STATICTYPE_UDF_MAP.get(text);
                    if (value == null)
                    {
                       value = Boolean.valueOf(row.getBoolean("udf_text"));
                    }
                 }
                 else
                 {
                    value = Boolean.valueOf(row.getBoolean("udf_number"));
                 }
                 break;
              }
  
              default:
              {
                 value = row.getString("udf_text");
                 break;
              }
           }
  
           container.set(field, value);
        }
     }
docs: Adds a user defined field value to a task.
  
  @param fieldType field type
  @param container FieldContainer instance
  @param row UDF data