AgileApps Support Wiki Pre Release

Difference between revisions of "Field Metadata"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 73: Line 73:
===Check Box===
===Check Box===
:<syntaxhighlight lang="java" enclose="div">
:<syntaxhighlight lang="java" enclose="div">
    FieldMetaDataBean field11 = new FieldMetaDataBean();
FieldMetaDataBean field11 = new FieldMetaDataBean();
    field11.setTitle("API Check Box");
field11.setTitle("API Check Box");
    field11.setTableColumn("api_check_box");
field11.setTableColumn("api_check_box");
    field11.setType("BOOLEAN");
field11.setType("BOOLEAN");
    field11.setUniversalProperty(true);
field11.setUniversalProperty(true);
    field11.setDescription("Check Box through JAVA API");
field11.setDescription("Check Box through JAVA API");
    field11.setExtendedFieldMetaData("Extendedmeta data");
field11.setExtendedFieldMetaData("Extendedmeta data");
    field11.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
field11.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
      List<CustomFieldVisibility> cfvList11 = new ArrayList<CustomFieldVisibility>();
List<CustomFieldVisibility> cfvList11 = new ArrayList<CustomFieldVisibility>();
      CustomFieldVisibility cfv111 = new CustomFieldVisibility();
  CustomFieldVisibility cfv111 = new CustomFieldVisibility();
    cfv111.setRoleId("1");
cfv111.setRoleId("1");
    cfv111.setAttribute("HIDDEN");
cfv111.setAttribute("HIDDEN");
    cfvList11.add(cfv111);
cfvList11.add(cfv111);
      CustomFieldVisibility cfv112 = new CustomFieldVisibility();
CustomFieldVisibility cfv112 = new CustomFieldVisibility();
    cfv112.setRoleId("2");
cfv112.setRoleId("2");
    cfv112.setAttribute("VISIBLE");
cfv112.setAttribute("VISIBLE");
    cfvList11.add(cfv112);
cfvList11.add(cfv112);
   
 
    CustomFieldVisibility cfv113 = new CustomFieldVisibility();
CustomFieldVisibility cfv113 = new CustomFieldVisibility();
    cfv113.setRoleId("3");
cfv113.setRoleId("3");
    cfv113.setAttribute("READ_ONLY");
cfv113.setAttribute("READ_ONLY");
    cfvList11.add(cfv113);
cfvList11.add(cfv113);
      CustomFieldVisibility cfv114 = new CustomFieldVisibility();
CustomFieldVisibility cfv114 = new CustomFieldVisibility();
    cfv114.setRoleId("1714555710");
cfv114.setRoleId("1714555710");
    cfv114.setAttribute("HIDDEN");
cfv114.setAttribute("HIDDEN");
    cfvList11.add(cfv114);
cfvList11.add(cfv114);
      field11.setCustomFieldVisibility(cfvList11);
  field11.setCustomFieldVisibility(cfvList11);
    return field11;
return field11;
</syntaxhighlight>
</syntaxhighlight>


===DateTime===
===Currency===
:<syntaxhighlight lang="java" enclose="div">          
:<syntaxhighlight lang="java" enclose="div">
    FieldMetaDataBean field12 = new FieldMetaDataBean();
FieldMetaDataBean field6 = new FieldMetaDataBean();
    field12.setTitle("API Date Time");
field6.setTitle("API Currency");
    field12.setTableColumn("api_date_time");
field6.setTableColumn("api_currency");
    field12.setType("DATETIME");
field6.setType("CURRENCY");
    field12.setUniversalProperty(true);
field6.setUniversalProperty(true);
    field12.setDescription("Date Time through JAVA API");
field6.setMaxFractionalDigits(4);
    field12.setExtendedFieldMetaData("Extendedmeta data");
field6.setDisplayLength(35);
    field12.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
field6.setDescription("Currency Field through JAVA API");
      List<CustomFieldVisibility> cfvList12 = new ArrayList<CustomFieldVisibility>();
field6.setExtendedFieldMetaData("Extendedmeta data");
        CustomFieldVisibility cfv121 = new CustomFieldVisibility();
field6.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
    cfv121.setRoleId("1");
List<CustomFieldVisibility> cfvList6 = new ArrayList<CustomFieldVisibility>();
    cfv121.setAttribute("HIDDEN");
  CustomFieldVisibility cfv61 = new CustomFieldVisibility();
    cfvList12.add(cfv121);
cfv61.setRoleId("1");
   
cfv61.setAttribute("HIDDEN");
    CustomFieldVisibility cfv122 = new CustomFieldVisibility();
cfvList6.add(cfv61);
    cfv122.setRoleId("2");
  CustomFieldVisibility cfv62 = new CustomFieldVisibility();
    cfv122.setAttribute("VISIBLE");
cfv62.setRoleId("2");
    cfvList12.add(cfv122);
cfv62.setAttribute("VISIBLE");
      CustomFieldVisibility cfv123 = new CustomFieldVisibility();
cfvList6.add(cfv62);
    cfv123.setRoleId("3");
  CustomFieldVisibility cfv63 = new CustomFieldVisibility();
    cfv123.setAttribute("READ_ONLY");
cfv63.setRoleId("3");
    cfvList12.add(cfv123);
cfv63.setAttribute("READ_ONLY");
      CustomFieldVisibility cfv124 = new CustomFieldVisibility();
cfvList6.add(cfv63);
    cfv124.setRoleId("1714555710");
  CustomFieldVisibility cfv64 = new CustomFieldVisibility();
    cfv124.setAttribute("HIDDEN");
cfv64.setRoleId("1714555710");
    cfvList12.add(cfv124);
cfv64.setAttribute("HIDDEN");
      field12.setCustomFieldVisibility(cfvList12);
cfvList6.add(cfv64);
    return field12;
  field6.setCustomFieldVisibility(cfvList6);
fmdb.add(field6);
  field6.setCustomFieldVisibility(cfvList6);
return field6;
</syntaxhighlight>
</syntaxhighlight>


===Time===
===Date===
:<syntaxhighlight lang="java" enclose="div">
:<syntaxhighlight lang="java" enclose="div">
    FieldMetaDataBean field13 = new FieldMetaDataBean();
FieldMetaDataBean field18 = new FieldMetaDataBean();
    field13.setTitle("API Time");
field18.setTitle("API Date");
    field13.setTableColumn("api_time");
field18.setTableColumn("api_date");
    field13.setType("TIME");
field18.setType("DATE");
    field13.setUniversalProperty(true);
field18.setUniversalProperty(true);
    field13.setDescription("Time through JAVA API");
field18.setDescription("Date field through JAVA API");
    field13.setExtendedFieldMetaData("Extendedmeta data");
field18.setExtendedFieldMetaData("Extendedmeta data");
    field13.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
field18.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
        List<CustomFieldVisibility> cfvList13 = new ArrayList<CustomFieldVisibility>();
  List<CustomFieldVisibility> cfvList18 = new ArrayList<CustomFieldVisibility>();
   
  CustomFieldVisibility cfv181 = new CustomFieldVisibility();
    CustomFieldVisibility cfv131 = new CustomFieldVisibility();
cfv181.setRoleId("1");
    cfv131.setRoleId("1");
cfv181.setAttribute("HIDDEN");
    cfv131.setAttribute("HIDDEN");
cfvList18.add(cfv181);
    cfvList13.add(cfv131);
  CustomFieldVisibility cfv182 = new CustomFieldVisibility();
      CustomFieldVisibility cfv132 = new CustomFieldVisibility();
cfv182.setRoleId("2");
    cfv132.setRoleId("2");
cfv182.setAttribute("VISIBLE");
    cfv132.setAttribute("VISIBLE");
cfvList18.add(cfv182);
    cfvList13.add(cfv132);
 
      CustomFieldVisibility cfv133 = new CustomFieldVisibility();
CustomFieldVisibility cfv183 = new CustomFieldVisibility();
    cfv133.setRoleId("3");
cfv183.setRoleId("3");
    cfv133.setAttribute("READ_ONLY");
cfv183.setAttribute("READ_ONLY");
    cfvList13.add(cfv133);
cfvList18.add(cfv183);
      CustomFieldVisibility cfv134 = new CustomFieldVisibility();
  CustomFieldVisibility cfv184 = new CustomFieldVisibility();
    cfv134.setRoleId("1714555710");
cfv184.setRoleId("1714555710");
    cfv134.setAttribute("HIDDEN");
cfv184.setAttribute("HIDDEN");
    cfvList13.add(cfv134);
cfvList18.add(cfv184);
      field13.setCustomFieldVisibility(cfvList13);
field18.setCustomFieldVisibility(cfvList18);
      return field13;
return field18;
</syntaxhighlight>
</syntaxhighlight>


===Currency===
===DateTime===
<syntaxhighlight lang="java" enclose="div">
:<syntaxhighlight lang="java" enclose="div">  
    FieldMetaDataBean field6 = new FieldMetaDataBean();
FieldMetaDataBean field12 = new FieldMetaDataBean();
    field6.setTitle("API Currency");
field12.setTitle("API Date Time");
    field6.setTableColumn("api_currency");
field12.setTableColumn("api_date_time");
    field6.setType("CURRENCY");
field12.setType("DATETIME");
    field6.setUniversalProperty(true);
field12.setUniversalProperty(true);
    field6.setMaxFractionalDigits(4);
field12.setDescription("Date Time through JAVA API");
    field6.setDisplayLength(35);
field12.setExtendedFieldMetaData("Extendedmeta data");
    field6.setDescription("Currency Field through JAVA API");
field12.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
    field6.setExtendedFieldMetaData("Extendedmeta data");
  List<CustomFieldVisibility> cfvList12 = new ArrayList<CustomFieldVisibility>();
    field6.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
  CustomFieldVisibility cfv121 = new CustomFieldVisibility();
      List<CustomFieldVisibility> cfvList6 = new ArrayList<CustomFieldVisibility>();
cfv121.setRoleId("1");
      CustomFieldVisibility cfv61 = new CustomFieldVisibility();
cfv121.setAttribute("HIDDEN");
    cfv61.setRoleId("1");
cfvList12.add(cfv121);
    cfv61.setAttribute("HIDDEN");
    cfvList6.add(cfv61);
      CustomFieldVisibility cfv62 = new CustomFieldVisibility();
    cfv62.setRoleId("2");
    cfv62.setAttribute("VISIBLE");
    cfvList6.add(cfv62);
      CustomFieldVisibility cfv63 = new CustomFieldVisibility();
    cfv63.setRoleId("3");
    cfv63.setAttribute("READ_ONLY");
    cfvList6.add(cfv63);
      CustomFieldVisibility cfv64 = new CustomFieldVisibility();
    cfv64.setRoleId("1714555710");
    cfv64.setAttribute("HIDDEN");
    cfvList6.add(cfv64);
      field6.setCustomFieldVisibility(cfvList6);
    fmdb.add(field6);
        field6.setCustomFieldVisibility(cfvList6);
    return field6;
</syntaxhighlight>


===Date===
CustomFieldVisibility cfv122 = new CustomFieldVisibility();
<syntaxhighlight lang="java" enclose="div">
cfv122.setRoleId("2");
    FieldMetaDataBean field18 = new FieldMetaDataBean();
cfv122.setAttribute("VISIBLE");
    field18.setTitle("API Date");
cfvList12.add(cfv122);
    field18.setTableColumn("api_date");
CustomFieldVisibility cfv123 = new CustomFieldVisibility();
    field18.setType("DATE");
cfv123.setRoleId("3");
    field18.setUniversalProperty(true);
cfv123.setAttribute("READ_ONLY");
    field18.setDescription("Date field through JAVA API");
cfvList12.add(cfv123);
    field18.setExtendedFieldMetaData("Extendedmeta data");
  CustomFieldVisibility cfv124 = new CustomFieldVisibility();
    field18.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
cfv124.setRoleId("1714555710");
      List<CustomFieldVisibility> cfvList18 = new ArrayList<CustomFieldVisibility>();
cfv124.setAttribute("HIDDEN");
      CustomFieldVisibility cfv181 = new CustomFieldVisibility();
cfvList12.add(cfv124);
    cfv181.setRoleId("1");
field12.setCustomFieldVisibility(cfvList12);
    cfv181.setAttribute("HIDDEN");
return field12;
    cfvList18.add(cfv181);
      CustomFieldVisibility cfv182 = new CustomFieldVisibility();
    cfv182.setRoleId("2");
    cfv182.setAttribute("VISIBLE");
    cfvList18.add(cfv182);
   
    CustomFieldVisibility cfv183 = new CustomFieldVisibility();
    cfv183.setRoleId("3");
    cfv183.setAttribute("READ_ONLY");
    cfvList18.add(cfv183);
      CustomFieldVisibility cfv184 = new CustomFieldVisibility();
    cfv184.setRoleId("1714555710");
    cfv184.setAttribute("HIDDEN");
    cfvList18.add(cfv184);
      field18.setCustomFieldVisibility(cfvList18);
    return field18;
</syntaxhighlight>
</syntaxhighlight>


===Double Field===
===Double Field===
<syntaxhighlight lang="java" enclose="div">
:<syntaxhighlight lang="java" enclose="div">
    FieldMetaDataBean field10 = new FieldMetaDataBean();
FieldMetaDataBean field10 = new FieldMetaDataBean();
    field10.setTitle("API Double Field");
field10.setTitle("API Double Field");
    field10.setTableColumn("api_double_field");
field10.setTableColumn("api_double_field");
    field10.setType("DOUBLE");
field10.setType("DOUBLE");
    field10.setUniversalProperty(true);
field10.setUniversalProperty(true);
    field10.setMaxFractionalDigits(5);
field10.setMaxFractionalDigits(5);
    field10.setDisplayLength(30);
field10.setDisplayLength(30);
    field10.setDescription("Double Field through JAVA API");
field10.setDescription("Double Field through JAVA API");
    field10.setExtendedFieldMetaData("Extendedmeta data");
field10.setExtendedFieldMetaData("Extendedmeta data");
    field10.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
field10.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
    List<CustomFieldVisibility> cfvList10 = new ArrayList<CustomFieldVisibility>();
List<CustomFieldVisibility> cfvList10 = new ArrayList<CustomFieldVisibility>();
      CustomFieldVisibility cfv101 = new CustomFieldVisibility();
CustomFieldVisibility cfv101 = new CustomFieldVisibility();
    cfv101.setRoleId("1");
cfv101.setRoleId("1");
    cfv101.setAttribute("HIDDEN");
cfv101.setAttribute("HIDDEN");
    cfvList10.add(cfv101);
cfvList10.add(cfv101);
      CustomFieldVisibility cfv102 = new CustomFieldVisibility();
CustomFieldVisibility cfv102 = new CustomFieldVisibility();
    cfv102.setRoleId("2");
cfv102.setRoleId("2");
    cfv102.setAttribute("VISIBLE");
cfv102.setAttribute("VISIBLE");
    cfvList10.add(cfv102);
cfvList10.add(cfv102);
      CustomFieldVisibility cfv103 = new CustomFieldVisibility();
CustomFieldVisibility cfv103 = new CustomFieldVisibility();
    cfv103.setRoleId("3");
cfv103.setRoleId("3");
    cfv103.setAttribute("READ_ONLY");
cfv103.setAttribute("READ_ONLY");
    cfvList10.add(cfv103);
cfvList10.add(cfv103);
   
 
    CustomFieldVisibility cfv104 = new CustomFieldVisibility();
CustomFieldVisibility cfv104 = new CustomFieldVisibility();
    cfv104.setRoleId("1714555710");
cfv104.setRoleId("1714555710");
    cfv104.setAttribute("HIDDEN");
cfv104.setAttribute("HIDDEN");
    cfvList10.add(cfv104);
cfvList10.add(cfv104);
    field10.setCustomFieldVisibility(cfvList10);
field10.setCustomFieldVisibility(cfvList10);
    return field10;
return field10;
</syntaxhighlight>
</syntaxhighlight>


===Email Address===
===Email Address===
<syntaxhighlight lang="java" enclose="div">
:<syntaxhighlight lang="java" enclose="div">
    FieldMetaDataBean field5 = new FieldMetaDataBean();
FieldMetaDataBean field5 = new FieldMetaDataBean();
    field5.setTitle("API Email Address");
field5.setTitle("API Email Address");
    field5.setTableColumn("api_mail_address");
field5.setTableColumn("api_mail_address");
    field5.setType("LEAD_EMAIL");
field5.setType("LEAD_EMAIL");
    field5.setUniversalProperty(true);
field5.setUniversalProperty(true);
    field5.setMaxStorageLength(50);
field5.setMaxStorageLength(50);
    field5.setDisplayLength(35);
field5.setDisplayLength(35);
    field5.setDescription("Email address through JAVA API");
field5.setDescription("Email address through JAVA API");
    field5.setExtendedFieldMetaData("Extendedmeta data");
field5.setExtendedFieldMetaData("Extendedmeta data");
    field5.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
field5.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
      List<CustomFieldVisibility> cfvList5 = new ArrayList<CustomFieldVisibility>();
List<CustomFieldVisibility> cfvList5 = new ArrayList<CustomFieldVisibility>();
        CustomFieldVisibility cfv51 = new CustomFieldVisibility();
  CustomFieldVisibility cfv51 = new CustomFieldVisibility();
    cfv51.setRoleId("1");
cfv51.setRoleId("1");
    cfv51.setAttribute("HIDDEN");
cfv51.setAttribute("HIDDEN");
    cfvList5.add(cfv51);
cfvList5.add(cfv51);
      CustomFieldVisibility cfv52 = new CustomFieldVisibility();
CustomFieldVisibility cfv52 = new CustomFieldVisibility();
    cfv52.setRoleId("2");
cfv52.setRoleId("2");
    cfv52.setAttribute("VISIBLE");
cfv52.setAttribute("VISIBLE");
    cfvList5.add(cfv52);
cfvList5.add(cfv52);
      CustomFieldVisibility cfv53 = new CustomFieldVisibility();
  CustomFieldVisibility cfv53 = new CustomFieldVisibility();
    cfv53.setRoleId("3");
cfv53.setRoleId("3");
    cfv53.setAttribute("READ_ONLY");
cfv53.setAttribute("READ_ONLY");
    cfvList5.add(cfv53);
cfvList5.add(cfv53);
   
 
    CustomFieldVisibility cfv54 = new CustomFieldVisibility();
CustomFieldVisibility cfv54 = new CustomFieldVisibility();
    cfv54.setRoleId("1714555710");
cfv54.setRoleId("1714555710");
    cfv54.setAttribute("HIDDEN");
cfv54.setAttribute("HIDDEN");
    cfvList5.add(cfv54);
cfvList5.add(cfv54);
   
 
    field5.setCustomFieldVisibility(cfvList5);
field5.setCustomFieldVisibility(cfvList5);
    return field5;
return field5;
</syntaxhighlight>
</syntaxhighlight>


===Look Up===
===Look Up===
<syntaxhighlight lang="java" enclose="div">
:<syntaxhighlight lang="java" enclose="div">
    FieldMetaDataBean field9 = new FieldMetaDataBean();
FieldMetaDataBean field9 = new FieldMetaDataBean();
    IDBean idbean = new IDBean();
IDBean idbean = new IDBean();
    field9.setTitle("API Look Up");
field9.setTitle("API Look Up");
    field9.setTableColumn("api_look_up");
field9.setTableColumn("api_look_up");
    field9.setType("LOOKUP");
field9.setType("LOOKUP");
    field9.setUniversalProperty(true);
field9.setUniversalProperty(true);
    idbean.setValue("9d86c06bd9974f35bdfc9c3b155ea21c");
idbean.setValue("9d86c06bd9974f35bdfc9c3b155ea21c");
    field9.setLookUpObjectId(idbean);
field9.setLookUpObjectId(idbean);
     // field9.setLookupPresetFilter(( First Name equals John ) and ( Date Created greater than 4/23/2010 ));
     // field9.setLookupPresetFilter(( First Name equals John ) and ( Date Created greater than 4/23/2010 ));
    field9.setIsMasterDetailRelationship(false);
field9.setIsMasterDetailRelationship(false);
    field9.setPostSelectionJS("alert('You have selected record :' + name) ;");
field9.setPostSelectionJS("alert('You have selected record :' + name) ;");
    field9.setDescription("Look Up through JAVA API");
field9.setDescription("Look Up through JAVA API");
    field9.setExtendedFieldMetaData("Extendedmeta data");
field9.setExtendedFieldMetaData("Extendedmeta data");
    field9.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
field9.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
        LookupPresetFilters lpf = new LookupPresetFilters();
  LookupPresetFilters lpf = new LookupPresetFilters();
    lpf.setCriteria_1_pre_bracket("(");
lpf.setCriteria_1_pre_bracket("(");
    lpf.setCriteria_1_column("field_name");
lpf.setCriteria_1_column("field_name");
    lpf.setCriteria_1_operator("equals");
lpf.setCriteria_1_operator("equals");
    lpf.setCriteria_1_value("John");
lpf.setCriteria_1_value("John");
    lpf.setCriteria_1_post_bracket(")");
lpf.setCriteria_1_post_bracket(")");
    lpf.setCriteria_2_join_operator("and");
lpf.setCriteria_2_join_operator("and");
    lpf.setCriteria_2_pre_bracket("(");
lpf.setCriteria_2_pre_bracket("(");
    lpf.setCriteria_2_column("date_created ");
lpf.setCriteria_2_column("date_created ");
    lpf.setCriteria_2_operator("greater than");
lpf.setCriteria_2_operator("greater than");
    lpf.setCriteria_2_value("4/23/2010");
lpf.setCriteria_2_value("4/23/2010");
    lpf.setCriteria_2_post_bracket(")");
lpf.setCriteria_2_post_bracket(")");
      field9.setLookupPresetFilter(lpf);
  field9.setLookupPresetFilter(lpf);
        List<CustomFieldVisibility> cfvList9 = new ArrayList<CustomFieldVisibility>();
  List<CustomFieldVisibility> cfvList9 = new ArrayList<CustomFieldVisibility>();
        CustomFieldVisibility cfv91 = new CustomFieldVisibility();
  CustomFieldVisibility cfv91 = new CustomFieldVisibility();
    cfv91.setRoleId("1");
cfv91.setRoleId("1");
    cfv91.setAttribute("HIDDEN");
cfv91.setAttribute("HIDDEN");
    cfvList9.add(cfv91);
cfvList9.add(cfv91);
      CustomFieldVisibility cfv92 = new CustomFieldVisibility();
  CustomFieldVisibility cfv92 = new CustomFieldVisibility();
    cfv92.setRoleId("2");
cfv92.setRoleId("2");
    cfv92.setAttribute("VISIBLE");
cfv92.setAttribute("VISIBLE");
    cfvList9.add(cfv92);
cfvList9.add(cfv92);
      CustomFieldVisibility cfv93 = new CustomFieldVisibility();
  CustomFieldVisibility cfv93 = new CustomFieldVisibility();
    cfv93.setRoleId("3");
cfv93.setRoleId("3");
    cfv93.setAttribute("READ_ONLY");
cfv93.setAttribute("READ_ONLY");
    cfvList9.add(cfv93);
cfvList9.add(cfv93);
      CustomFieldVisibility cfv94 = new CustomFieldVisibility();
  CustomFieldVisibility cfv94 = new CustomFieldVisibility();
    cfv94.setRoleId("1714555710");
cfv94.setRoleId("1714555710");
    cfv94.setAttribute("HIDDEN");
cfv94.setAttribute("HIDDEN");
    cfvList9.add(cfv94);
cfvList9.add(cfv94);
        field9.setCustomFieldVisibility(cfvList9);
  field9.setCustomFieldVisibility(cfvList9);
    return field9;
return field9;
</syntaxhighlight>
</syntaxhighlight>


===Multi-Select Check Box===
===Multi-Select Check Box===
<syntaxhighlight lang="java" enclose="div">
:<syntaxhighlight lang="java" enclose="div">
    FieldMetaDataBean field15 = new FieldMetaDataBean();
FieldMetaDataBean field15 = new FieldMetaDataBean();
    field15.setTitle("API Multi Check Box");
field15.setTitle("API Multi Check Box");
    field15.setTableColumn("api_multi_chk_box");
field15.setTableColumn("api_multi_chk_box");
    field15.setType("MULTI_CHECK_BOX");
field15.setType("MULTI_CHECK_BOX");
    field15.setUniversalProperty(true);
field15.setUniversalProperty(true);
    field15.setDescription("Multi Check Box through JAVA API");
field15.setDescription("Multi Check Box through JAVA API");
    field15.setExtendedFieldMetaData("Extendedmeta data");
field15.setExtendedFieldMetaData("Extendedmeta data");
    field15.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
field15.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
    EnumerationDetailsBean eD2 = new EnumerationDetailsBean();
EnumerationDetailsBean eD2 = new EnumerationDetailsBean();
        eD2.setShowFirstValueAsDefault(false);
    eD2.setShowFirstValueAsDefault(false);
    eD2.setSortFlag(false);
eD2.setSortFlag(false);
    List<EnumerationDetailsBean.EnumerationItemBean> eIList1 = new ArrayList<EnumerationDetailsBean.EnumerationItemBean>();    
List<EnumerationDetailsBean.EnumerationItemBean> eIList1 = new ArrayList<EnumerationDetailsBean.EnumerationItemBean>();
   
 
    EnumerationDetailsBean.EnumerationItemBean eI1 = new EnumerationDetailsBean.EnumerationItemBean();
EnumerationDetailsBean.EnumerationItemBean eI1 = new EnumerationDetailsBean.EnumerationItemBean();
    eI1.setPicklistLabel("1");
eI1.setPicklistLabel("1");
    eI1.setPicklistValue("a");
eI1.setPicklistValue("a");
    eI1.setTextColor("#000000");
eI1.setTextColor("#000000");
    eI1.setTextBgColor("#FFFFFF");
eI1.setTextBgColor("#FFFFFF");
    eI1.setShowOnlyImage(false);
eI1.setShowOnlyImage(false);
    eI1.setFlagIsOptgroup(false);
eI1.setFlagIsOptgroup(false);
   
 
    eIList1.add(eI1);
eIList1.add(eI1);
          EnumerationDetailsBean.EnumerationItemBean eI11 = new EnumerationDetailsBean.EnumerationItemBean();
EnumerationDetailsBean.EnumerationItemBean eI11 = new EnumerationDetailsBean.EnumerationItemBean();
    eI11.setPicklistLabel("2");
eI11.setPicklistLabel("2");
    eI11.setPicklistValue("b");
eI11.setPicklistValue("b");
    eI11.setTextColor("#000000");
eI11.setTextColor("#000000");
    eI11.setTextBgColor("#FFFFFF");
eI11.setTextBgColor("#FFFFFF");
    eI11.setShowOnlyImage(false);
eI11.setShowOnlyImage(false);
    eI11.setFlagIsOptgroup(false);
eI11.setFlagIsOptgroup(false);
          eIList1.add(eI11);
eIList1.add(eI11);
          EnumerationDetailsBean.EnumerationItemBean eI12 = new EnumerationDetailsBean.EnumerationItemBean();
EnumerationDetailsBean.EnumerationItemBean eI12 = new EnumerationDetailsBean.EnumerationItemBean();
    eI12.setPicklistLabel("3");
eI12.setPicklistLabel("3");
    eI12.setPicklistValue("c");
eI12.setPicklistValue("c");
    eI12.setTextColor("#000000");
eI12.setTextColor("#000000");
    eI12.setTextBgColor("#FFFFFF");
eI12.setTextBgColor("#FFFFFF");
    eI12.setShowOnlyImage(false);
eI12.setShowOnlyImage(false);
    eI12.setFlagIsOptgroup(false);
eI12.setFlagIsOptgroup(false);
          eIList1.add(eI12);  
eIList1.add(eI12);  
          eD2.setEnumerationItems(eIList1);
eD2.setEnumerationItems(eIList1);
          field15.setEnumerationDetails(eD2);
field15.setEnumerationDetails(eD2);
          List<CustomFieldVisibility> cfvList15 = new ArrayList<CustomFieldVisibility>();
List<CustomFieldVisibility> cfvList15 = new ArrayList<CustomFieldVisibility>();
          CustomFieldVisibility cfv151 = new CustomFieldVisibility();
CustomFieldVisibility cfv151 = new CustomFieldVisibility();
    cfv151.setRoleId("1");
cfv151.setRoleId("1");
    cfv151.setAttribute("HIDDEN");
cfv151.setAttribute("HIDDEN");
    cfvList15.add(cfv151);
cfvList15.add(cfv151);
          CustomFieldVisibility cfv152 = new CustomFieldVisibility();
CustomFieldVisibility cfv152 = new CustomFieldVisibility();
    cfv152.setRoleId("2");
cfv152.setRoleId("2");
    cfv152.setAttribute("VISIBLE");
cfv152.setAttribute("VISIBLE");
    cfvList15.add(cfv152);
cfvList15.add(cfv152);
   
 
    CustomFieldVisibility cfv153 = new CustomFieldVisibility();
CustomFieldVisibility cfv153 = new CustomFieldVisibility();
    cfv153.setRoleId("3");
cfv153.setRoleId("3");
    cfv153.setAttribute("READ_ONLY");
cfv153.setAttribute("READ_ONLY");
    cfvList15.add(cfv153);
cfvList15.add(cfv153);
   
 
    CustomFieldVisibility cfv154 = new CustomFieldVisibility();
CustomFieldVisibility cfv154 = new CustomFieldVisibility();
    cfv154.setRoleId("1714555710");
cfv154.setRoleId("1714555710");
    cfv154.setAttribute("HIDDEN");
cfv154.setAttribute("HIDDEN");
    cfvList15.add(cfv154);
cfvList15.add(cfv154);
      field15.setCustomFieldVisibility(cfvList15);
  field15.setCustomFieldVisibility(cfvList15);
    return field15;
return field15;
    Global Pick List
Global Pick List
      FieldMetaDataBean field16 = new FieldMetaDataBean();
FieldMetaDataBean field16 = new FieldMetaDataBean();
    field16.setTitle("API Global Pick List");
field16.setTitle("API Global Pick List");
    field16.setTableColumn("api_global_pick_list");
field16.setTableColumn("api_global_pick_list");
    field16.setType("GLOBAL_PICK_LIST");
field16.setType("GLOBAL_PICK_LIST");
    field16.setUniversalProperty(true);
field16.setUniversalProperty(true);
    IDBean idbean1 = new IDBean();
IDBean idbean1 = new IDBean();
    idbean1.setValue("case_reason");
idbean1.setValue("case_reason");
    field16.setGlobalPicklistId(idbean1);
field16.setGlobalPicklistId(idbean1);
    field16.setDescription("Global Pick list through JAVA API");
field16.setDescription("Global Pick list through JAVA API");
    field16.setExtendedFieldMetaData("Extendedmeta data");
field16.setExtendedFieldMetaData("Extendedmeta data");
    field16.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
field16.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
      List<CustomFieldVisibility> cfvList16 = new ArrayList<CustomFieldVisibility>();
List<CustomFieldVisibility> cfvList16 = new ArrayList<CustomFieldVisibility>();
      CustomFieldVisibility cfv161 = new CustomFieldVisibility();
  CustomFieldVisibility cfv161 = new CustomFieldVisibility();
    cfv161.setRoleId("1");
cfv161.setRoleId("1");
    cfv161.setAttribute("HIDDEN");
cfv161.setAttribute("HIDDEN");
    cfvList16.add(cfv161);
cfvList16.add(cfv161);
      CustomFieldVisibility cfv162 = new CustomFieldVisibility();
CustomFieldVisibility cfv162 = new CustomFieldVisibility();
    cfv162.setRoleId("2");
cfv162.setRoleId("2");
    cfv162.setAttribute("VISIBLE");
cfv162.setAttribute("VISIBLE");
    cfvList16.add(cfv162);
cfvList16.add(cfv162);
      CustomFieldVisibility cfv163 = new CustomFieldVisibility();
CustomFieldVisibility cfv163 = new CustomFieldVisibility();
    cfv163.setRoleId("3");
cfv163.setRoleId("3");
    cfv163.setAttribute("READ_ONLY");
cfv163.setAttribute("READ_ONLY");
    cfvList16.add(cfv163);
cfvList16.add(cfv163);
      CustomFieldVisibility cfv164 = new CustomFieldVisibility();
  CustomFieldVisibility cfv164 = new CustomFieldVisibility();
    cfv164.setRoleId("1714555710");
cfv164.setRoleId("1714555710");
    cfv164.setAttribute("HIDDEN");
cfv164.setAttribute("HIDDEN");
    cfvList16.add(cfv164);
cfvList16.add(cfv164);
      field16.setCustomFieldVisibility(cfvList16);
field16.setCustomFieldVisibility(cfvList16);
    return field16;
return field16;
</syntaxhighlight>     
</syntaxhighlight>     


===Number===
===Number===
<syntaxhighlight lang="java" enclose="div">
:<syntaxhighlight lang="java" enclose="div">
    FieldMetaDataBean field2 = new FieldMetaDataBean();
FieldMetaDataBean field2 = new FieldMetaDataBean();
    field2.setTitle("API Number");
field2.setTitle("API Number");
    field2.setTableColumn("api_number");
field2.setTableColumn("api_number");
    field2.setType("NUMBER");
field2.setType("NUMBER");
    field2.setUniversalProperty(true);
field2.setUniversalProperty(true);
    field2.setMaxStorageLength(50);
field2.setMaxStorageLength(50);
    field2.setDisplayLength(35);
field2.setDisplayLength(35);
    field2.setMinNumericValue(-2147483648);
field2.setMinNumericValue(-2147483648);
    field2.setMaxNumericValue(2147483647);
field2.setMaxNumericValue(2147483647);
    field2.setDescription("Text field through JAVA API");
field2.setDescription("Text field through JAVA API");
    field2.setExtendedFieldMetaData("Extended meta data");
field2.setExtendedFieldMetaData("Extended meta data");
    field2.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
field2.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
   
 
    List<CustomFieldVisibility> cfvList2 = new ArrayList<CustomFieldVisibility>();
List<CustomFieldVisibility> cfvList2 = new ArrayList<CustomFieldVisibility>();
   
 
    CustomFieldVisibility cfv11 = new CustomFieldVisibility();
CustomFieldVisibility cfv11 = new CustomFieldVisibility();
    cfv11.setRoleId("1");
cfv11.setRoleId("1");
    cfv11.setAttribute("HIDDEN");
cfv11.setAttribute("HIDDEN");
    cfvList2.add(cfv11);
cfvList2.add(cfv11);
   
 
    CustomFieldVisibility cfv12 = new CustomFieldVisibility();
CustomFieldVisibility cfv12 = new CustomFieldVisibility();
    cfv12.setRoleId("2");
cfv12.setRoleId("2");
    cfv12.setAttribute("VISIBLE");
cfv12.setAttribute("VISIBLE");
    cfvList2.add(cfv12);
cfvList2.add(cfv12);
   
 
    CustomFieldVisibility cfv13 = new CustomFieldVisibility();
CustomFieldVisibility cfv13 = new CustomFieldVisibility();
    cfv13.setRoleId("1");
cfv13.setRoleId("1");
    cfv13.setAttribute("HIDDEN");
cfv13.setAttribute("HIDDEN");
    cfvList2.add(cfv13);
cfvList2.add(cfv13);
   
 
    CustomFieldVisibility cfv14 = new CustomFieldVisibility();
CustomFieldVisibility cfv14 = new CustomFieldVisibility();
    cfv14.setRoleId("1714555710");
cfv14.setRoleId("1714555710");
    cfv14.setAttribute("HIDDEN");
cfv14.setAttribute("HIDDEN");
    cfvList2.add(cfv14);
cfvList2.add(cfv14);
   
 
    field2.setCustomFieldVisibility(cfvList2);
field2.setCustomFieldVisibility(cfvList2);
    return field2;
return field2;
</syntaxhighlight>
</syntaxhighlight>


===Percent===
===Percent===
<syntaxhighlight lang="java" enclose="div">
:<syntaxhighlight lang="java" enclose="div">
   FieldMetaDataBean field17 = new FieldMetaDataBean();
   FieldMetaDataBean field17 = new FieldMetaDataBean();
    field17.setTitle("API Percent");
field17.setTitle("API Percent");
    field17.setTableColumn("api_percent");
field17.setTableColumn("api_percent");
    field17.setType("PERCENT");
field17.setType("PERCENT");
    field17.setUniversalProperty(true);
field17.setUniversalProperty(true);
    field17.setMaxFractionalDigits(2);
field17.setMaxFractionalDigits(2);
    field17.setDisplayLength(35);
field17.setDisplayLength(35);
    field17.setDescription("Percentage field through JAVA API");
field17.setDescription("Percentage field through JAVA API");
    field17.setExtendedFieldMetaData("Extendedmeta data");
field17.setExtendedFieldMetaData("Extendedmeta data");
    field17.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
field17.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
      List<CustomFieldVisibility> cfvList17 = new ArrayList<CustomFieldVisibility>();
List<CustomFieldVisibility> cfvList17 = new ArrayList<CustomFieldVisibility>();
      CustomFieldVisibility cfv171 = new CustomFieldVisibility();
  CustomFieldVisibility cfv171 = new CustomFieldVisibility();
    cfv171.setRoleId("1");
cfv171.setRoleId("1");
    cfv171.setAttribute("HIDDEN");
cfv171.setAttribute("HIDDEN");
    cfvList17.add(cfv171);
cfvList17.add(cfv171);
      CustomFieldVisibility cfv172 = new CustomFieldVisibility();
  CustomFieldVisibility cfv172 = new CustomFieldVisibility();
    cfv172.setRoleId("2");
cfv172.setRoleId("2");
    cfv172.setAttribute("VISIBLE");
cfv172.setAttribute("VISIBLE");
    cfvList17.add(cfv172);
cfvList17.add(cfv172);
      CustomFieldVisibility cfv173 = new CustomFieldVisibility();
CustomFieldVisibility cfv173 = new CustomFieldVisibility();
    cfv173.setRoleId("3");
cfv173.setRoleId("3");
    cfv173.setAttribute("READ_ONLY");
cfv173.setAttribute("READ_ONLY");
    cfvList17.add(cfv173);
cfvList17.add(cfv173);
   
 
    CustomFieldVisibility cfv174 = new CustomFieldVisibility();
CustomFieldVisibility cfv174 = new CustomFieldVisibility();
    cfv174.setRoleId("1714555710");
cfv174.setRoleId("1714555710");
    cfv174.setAttribute("HIDDEN");
cfv174.setAttribute("HIDDEN");
    cfvList17.add(cfv174);
cfvList17.add(cfv174);
      field17.setCustomFieldVisibility(cfvList17);
  field17.setCustomFieldVisibility(cfvList17);
    return field17;
return field17;
</syntaxhighlight>
</syntaxhighlight>


===Phone/Fax===
===Phone/Fax===
<syntaxhighlight lang="java" enclose="div">
:<syntaxhighlight lang="java" enclose="div">
    FieldMetaDataBean field3 = new FieldMetaDataBean();
FieldMetaDataBean field3 = new FieldMetaDataBean();
    field3.setTitle("API Phone Fax");
field3.setTitle("API Phone Fax");
    field3.setTableColumn("api_phone_fax");
field3.setTableColumn("api_phone_fax");
    field3.setType("PHONE");
field3.setType("PHONE");
    field3.setUniversalProperty(true);
field3.setUniversalProperty(true);
    field3.setMaxStorageLength(50);
field3.setMaxStorageLength(50);
    field3.setDisplayLength(35);
field3.setDisplayLength(35);
    field3.setDescription("Phone field through JAVA API");
field3.setDescription("Phone field through JAVA API");
    field3.setExtendedFieldMetaData("Extendedmeta data");
field3.setExtendedFieldMetaData("Extendedmeta data");
    field3.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
field3.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
   
 
    List<CustomFieldVisibility> cfvList3 = new ArrayList<CustomFieldVisibility>();
List<CustomFieldVisibility> cfvList3 = new ArrayList<CustomFieldVisibility>();
   
 
    CustomFieldVisibility cfv31 = new CustomFieldVisibility();
CustomFieldVisibility cfv31 = new CustomFieldVisibility();
    cfv31.setRoleId("1");
cfv31.setRoleId("1");
    cfv31.setAttribute("HIDDEN");
cfv31.setAttribute("HIDDEN");
    cfvList3.add(cfv31);
cfvList3.add(cfv31);
   
 
    CustomFieldVisibility cfv32 = new CustomFieldVisibility();
CustomFieldVisibility cfv32 = new CustomFieldVisibility();
    cfv32.setRoleId("2");
cfv32.setRoleId("2");
    cfv32.setAttribute("VISIBLE");
cfv32.setAttribute("VISIBLE");
    cfvList3.add(cfv32);
cfvList3.add(cfv32);
   
 
    CustomFieldVisibility cfv33 = new CustomFieldVisibility();
CustomFieldVisibility cfv33 = new CustomFieldVisibility();
    cfv33.setRoleId("4");
cfv33.setRoleId("4");
    cfv33.setAttribute("READ_ONLY");
cfv33.setAttribute("READ_ONLY");
    cfvList3.add(cfv33);
cfvList3.add(cfv33);
   
 
    CustomFieldVisibility cfv34 = new CustomFieldVisibility();
CustomFieldVisibility cfv34 = new CustomFieldVisibility();
    cfv34.setRoleId("1714555710");
cfv34.setRoleId("1714555710");
    cfv34.setAttribute("HIDDEN");
cfv34.setAttribute("HIDDEN");
    cfvList3.add(cfv34);
cfvList3.add(cfv34);
   
 
    field3.setCustomFieldVisibility(cfvList3);
field3.setCustomFieldVisibility(cfvList3);
    return field3;
return field3;
</syntaxhighlight>
</syntaxhighlight>


===Pick List===
===Pick List===
<syntaxhighlight lang="java" enclose="div">
:<syntaxhighlight lang="java" enclose="div">
    FieldMetaDataBean field8 = new FieldMetaDataBean();
FieldMetaDataBean field8 = new FieldMetaDataBean();
    field8.setTitle("API Pick List");
field8.setTitle("API Pick List");
    field8.setTableColumn("api_pick_list");
field8.setTableColumn("api_pick_list");
    field8.setType("PICK_LIST");
field8.setType("PICK_LIST");
    field8.setUniversalProperty(true);
field8.setUniversalProperty(true);
    field8.setDescription("Pick List through JAVA API");
field8.setDescription("Pick List through JAVA API");
    field8.setExtendedFieldMetaData("Extendedmeta data");
field8.setExtendedFieldMetaData("Extendedmeta data");
    field8.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
field8.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
      EnumerationDetailsBean eD = new EnumerationDetailsBean();
EnumerationDetailsBean eD = new EnumerationDetailsBean();
    eD.setShowFirstValueAsDefault(false);
eD.setShowFirstValueAsDefault(false);
    eD.setSortFlag(false);
eD.setSortFlag(false);
    field8.setEnumerationDetails(eD);
field8.setEnumerationDetails(eD);
      List<CustomFieldVisibility> cfvList8 = new ArrayList<CustomFieldVisibility>();
List<CustomFieldVisibility> cfvList8 = new ArrayList<CustomFieldVisibility>();
      CustomFieldVisibility cfv81 = new CustomFieldVisibility();
  CustomFieldVisibility cfv81 = new CustomFieldVisibility();
    cfv81.setRoleId("1");
cfv81.setRoleId("1");
    cfv81.setAttribute("HIDDEN");
cfv81.setAttribute("HIDDEN");
    cfvList8.add(cfv81);
cfvList8.add(cfv81);
      CustomFieldVisibility cfv82 = new CustomFieldVisibility();
CustomFieldVisibility cfv82 = new CustomFieldVisibility();
    cfv82.setRoleId("2");
cfv82.setRoleId("2");
    cfv82.setAttribute("VISIBLE");
cfv82.setAttribute("VISIBLE");
    cfvList8.add(cfv82);
cfvList8.add(cfv82);
      CustomFieldVisibility cfv83 = new CustomFieldVisibility();
CustomFieldVisibility cfv83 = new CustomFieldVisibility();
    cfv83.setRoleId("3");
cfv83.setRoleId("3");
    cfv83.setAttribute("READ_ONLY");
cfv83.setAttribute("READ_ONLY");
    cfvList8.add(cfv83);
cfvList8.add(cfv83);
      CustomFieldVisibility cfv84 = new CustomFieldVisibility();
CustomFieldVisibility cfv84 = new CustomFieldVisibility();
    cfv84.setRoleId("1714555710");
cfv84.setRoleId("1714555710");
    cfv84.setAttribute("HIDDEN");
cfv84.setAttribute("HIDDEN");
    cfvList8.add(cfv84);
cfvList8.add(cfv84);
    field8.setCustomFieldVisibility(cfvList8);
field8.setCustomFieldVisibility(cfvList8);
    return field8;
return field8;
</syntaxhighlight>
</syntaxhighlight>


===RadioButton===
===RadioButton===
<syntaxhighlight lang="java" enclose="div">
:<syntaxhighlight lang="java" enclose="div">
    FieldMetaDataBean field14 = new FieldMetaDataBean();
FieldMetaDataBean field14 = new FieldMetaDataBean();
    field14.setTitle("Api RadioButton");
field14.setTitle("Api RadioButton");
    field14.setTableColumn("api_rdbutton");
field14.setTableColumn("api_rdbutton");
    field14.setType("RADIO_BUTTON");
field14.setType("RADIO_BUTTON");
    field14.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
field14.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
   
 
    EnumerationDetailsBean eD1 = new EnumerationDetailsBean();
EnumerationDetailsBean eD1 = new EnumerationDetailsBean();
    eD1.setShowFirstValueAsDefault(false);
eD1.setShowFirstValueAsDefault(false);
    eD1.setSortFlag(false);
eD1.setSortFlag(false);
    List<EnumerationDetailsBean.EnumerationItemBean> eIList = new   
List<EnumerationDetailsBean.EnumerationItemBean> eIList = new   
      ArrayList<EnumerationDetailsBean.EnumerationItemBean>();   
  ArrayList<EnumerationDetailsBean.EnumerationItemBean>();   
    
    
    EnumerationDetailsBean.EnumerationItemBean eI = new EnumerationDetailsBean.EnumerationItemBean();
EnumerationDetailsBean.EnumerationItemBean eI = new EnumerationDetailsBean.EnumerationItemBean();
    eI.setPicklistLabel("label1");
eI.setPicklistLabel("label1");
    eI.setPicklistValue("value1");
eI.setPicklistValue("value1");
    eI.setTextColor("#FFFFFF");
eI.setTextColor("#FFFFFF");
    eI.setTextBgColor("#000000");
eI.setTextBgColor("#000000");
    eI.setShowOnlyImage(false);
eI.setShowOnlyImage(false);
    eI.setFlagIsOptgroup(false);
eI.setFlagIsOptgroup(false);
        eIList.add(eI);
  eIList.add(eI);
   
 
    EnumerationDetailsBean.EnumerationItemBean eI1 = new EnumerationDetailsBean.EnumerationItemBean();
EnumerationDetailsBean.EnumerationItemBean eI1 = new EnumerationDetailsBean.EnumerationItemBean();
    eI1.setPicklistLabel("label2");
eI1.setPicklistLabel("label2");
    eI1.setPicklistValue("value2");
eI1.setPicklistValue("value2");
    eI1.setTextColor("#FFFFFF");
eI1.setTextColor("#FFFFFF");
    eI1.setTextBgColor("#000000");
eI1.setTextBgColor("#000000");
    eI1.setShowOnlyImage(false);
eI1.setShowOnlyImage(false);
    eI1.setFlagIsOptgroup(false);
eI1.setFlagIsOptgroup(false);
        eIList.add(eI1);
    eIList.add(eI1);
      
      
    EnumerationDetailsBean.EnumerationItemBean eI2 = new EnumerationDetailsBean.EnumerationItemBean();
EnumerationDetailsBean.EnumerationItemBean eI2 = new EnumerationDetailsBean.EnumerationItemBean();
    eI2.setPicklistLabel("label3");
eI2.setPicklistLabel("label3");
    eI2.setPicklistValue("value3");
eI2.setPicklistValue("value3");
    eI2.setTextColor("#FFFFFF");
eI2.setTextColor("#FFFFFF");
    eI2.setTextBgColor("#000000");
eI2.setTextBgColor("#000000");
    eI2.setShowOnlyImage(false);
eI2.setShowOnlyImage(false);
    eI2.setFlagIsOptgroup(false);
eI2.setFlagIsOptgroup(false);
        eIList.add(eI2);  
    eIList.add(eI2);  
          eD1.setEnumerationItems(eIList);
eD1.setEnumerationItems(eIList);
          field14.setEnumerationDetails(eD1);
field14.setEnumerationDetails(eD1);
    List<CustomFieldVisibility> cfvList14 = new ArrayList<CustomFieldVisibility>();
List<CustomFieldVisibility> cfvList14 = new ArrayList<CustomFieldVisibility>();
          CustomFieldVisibility cfv141 = new CustomFieldVisibility();
CustomFieldVisibility cfv141 = new CustomFieldVisibility();
    cfv141.setRoleId("1");
cfv141.setRoleId("1");
    cfv141.setAttribute("HIDDEN");
cfv141.setAttribute("HIDDEN");
    cfvList14.add(cfv141);
cfvList14.add(cfv141);
        CustomFieldVisibility cfv142 = new CustomFieldVisibility();
    CustomFieldVisibility cfv142 = new CustomFieldVisibility();
    cfv142.setRoleId("2");
cfv142.setRoleId("2");
    cfv142.setAttribute("VISIBLE");
cfv142.setAttribute("VISIBLE");
    cfvList14.add(cfv142);
cfvList14.add(cfv142);
      CustomFieldVisibility cfv143 = new CustomFieldVisibility();
  CustomFieldVisibility cfv143 = new CustomFieldVisibility();
    cfv143.setRoleId("3");
cfv143.setRoleId("3");
    cfv143.setAttribute("READ_ONLY");
cfv143.setAttribute("READ_ONLY");
    cfvList14.add(cfv143);
cfvList14.add(cfv143);
      CustomFieldVisibility cfv144 = new CustomFieldVisibility();
CustomFieldVisibility cfv144 = new CustomFieldVisibility();
    cfv144.setRoleId("1714555710");
cfv144.setRoleId("1714555710");
    cfv144.setAttribute("HIDDEN");
cfv144.setAttribute("HIDDEN");
    cfvList14.add(cfv144);
cfvList14.add(cfv144);
      field14.setCustomFieldVisibility(cfvList14);
  field14.setCustomFieldVisibility(cfvList14);
    return field14;
return field14;
</syntaxhighlight>
</syntaxhighlight>


===RichText Area===
===RichText Area===
<syntaxhighlight lang="java" enclose="div">
:<syntaxhighlight lang="java" enclose="div">
    FieldMetaDataBean field4 = new FieldMetaDataBean();
FieldMetaDataBean field4 = new FieldMetaDataBean();
    field4.setTitle("API Rich Text Area");
field4.setTitle("API Rich Text Area");
    field4.setTableColumn("api_rich_text_area");
field4.setTableColumn("api_rich_text_area");
    field4.setType("RICHTEXT_AREA");
field4.setType("RICHTEXT_AREA");
    field4.setUniversalProperty(true);
field4.setUniversalProperty(true);
    field4.setWidth(500);
field4.setWidth(500);
    field4.setDescription("Rich Text Area through JAVA API");
field4.setDescription("Rich Text Area through JAVA API");
    field4.setExtendedFieldMetaData("Extendedmeta data");
field4.setExtendedFieldMetaData("Extendedmeta data");
    field4.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
field4.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
   
 
    List<CustomFieldVisibility> cfvList4 = new ArrayList<CustomFieldVisibility>();
List<CustomFieldVisibility> cfvList4 = new ArrayList<CustomFieldVisibility>();
   
 
    CustomFieldVisibility cfv41 = new CustomFieldVisibility();
CustomFieldVisibility cfv41 = new CustomFieldVisibility();
    cfv41.setRoleId("1");
cfv41.setRoleId("1");
    cfv41.setAttribute("HIDDEN");
cfv41.setAttribute("HIDDEN");
    cfvList4.add(cfv41);
cfvList4.add(cfv41);
   
 
    CustomFieldVisibility cfv42 = new CustomFieldVisibility();
CustomFieldVisibility cfv42 = new CustomFieldVisibility();
    cfv42.setRoleId("2");
cfv42.setRoleId("2");
    cfv42.setAttribute("VISIBLE");
cfv42.setAttribute("VISIBLE");
    cfvList4.add(cfv42);
cfvList4.add(cfv42);
   
 
    CustomFieldVisibility cfv43 = new CustomFieldVisibility();
CustomFieldVisibility cfv43 = new CustomFieldVisibility();
    cfv43.setRoleId("3");
cfv43.setRoleId("3");
    cfv43.setAttribute("READ_ONLY");
cfv43.setAttribute("READ_ONLY");
    cfvList4.add(cfv43);
cfvList4.add(cfv43);
   
 
    CustomFieldVisibility cfv44 = new CustomFieldVisibility();
CustomFieldVisibility cfv44 = new CustomFieldVisibility();
    cfv44.setRoleId("1714555710");
cfv44.setRoleId("1714555710");
    cfv44.setAttribute("HIDDEN");
cfv44.setAttribute("HIDDEN");
    cfvList4.add(cfv44);
cfvList4.add(cfv44);
   
 
    field4.setCustomFieldVisibility(cfvList4);
field4.setCustomFieldVisibility(cfvList4);
    return field4;
return field4;
</syntaxhighlight>    
</syntaxhighlight>
   
   
===Text Area===
===Text Area===
<syntaxhighlight lang="java" enclose="div">
:<syntaxhighlight lang="java" enclose="div">
    FieldMetaDataBean field1 = new FieldMetaDataBean();
FieldMetaDataBean field1 = new FieldMetaDataBean();
    field1.setTitle("API Name");
field1.setTitle("API Name");
    field1.setTableColumn("api_name");
field1.setTableColumn("api_name");
    field1.setType("TEXT_FIELD");
field1.setType("TEXT_FIELD");
    field1.setUniversalProperty(true);
field1.setUniversalProperty(true);
    field1.setMaxStorageLength(50);
field1.setMaxStorageLength(50);
    field1.setDisplayLength(29);
field1.setDisplayLength(29);
    field1.setDescription("Text field through JAVA API");
field1.setDescription("Text field through JAVA API");
    field1.setExtendedFieldMetaData("Extendedmeta data");
field1.setExtendedFieldMetaData("Extendedmeta data");
    field1.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
field1.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
    List<CustomFieldVisibility> cfvList1 = new ArrayList<CustomFieldVisibility>();
List<CustomFieldVisibility> cfvList1 = new ArrayList<CustomFieldVisibility>();
   
 
    CustomFieldVisibility cfv1 = new CustomFieldVisibility();
CustomFieldVisibility cfv1 = new CustomFieldVisibility();
    cfv1.setRoleId("1");
cfv1.setRoleId("1");
    cfv1.setAttribute("HIDDEN");
cfv1.setAttribute("HIDDEN");
    cfvList1.add(cfv1);
cfvList1.add(cfv1);
   
 
    CustomFieldVisibility cfv2 = new CustomFieldVisibility();
CustomFieldVisibility cfv2 = new CustomFieldVisibility();
    cfv2.setRoleId("2");
cfv2.setRoleId("2");
    cfv2.setAttribute("VISIBLE");
cfv2.setAttribute("VISIBLE");
    cfvList1.add(cfv2);
cfvList1.add(cfv2);
   
 
    CustomFieldVisibility cfv3 = new CustomFieldVisibility();
CustomFieldVisibility cfv3 = new CustomFieldVisibility();
    cfv3.setRoleId("1");
cfv3.setRoleId("1");
    cfv3.setAttribute("HIDDEN");
cfv3.setAttribute("HIDDEN");
    cfvList1.add(cfv3);
cfvList1.add(cfv3);
   
 
    CustomFieldVisibility cfv4 = new CustomFieldVisibility();
CustomFieldVisibility cfv4 = new CustomFieldVisibility();
    cfv4.setRoleId("1714555710");
cfv4.setRoleId("1714555710");
    cfv4.setAttribute("HIDDEN");
cfv4.setAttribute("HIDDEN");
    cfvList1.add(cfv4);
cfvList1.add(cfv4);
   
 
    field1.setCustomFieldVisibility(cfvList1);
field1.setCustomFieldVisibility(cfvList1);
    return field1;
return field1;
</syntaxhighlight>
 
===Time===
:<syntaxhighlight lang="java" enclose="div">
FieldMetaDataBean field13 = new FieldMetaDataBean();
field13.setTitle("API Time");
field13.setTableColumn("api_time");
field13.setType("TIME");
field13.setUniversalProperty(true);
field13.setDescription("Time through JAVA API");
field13.setExtendedFieldMetaData("Extendedmeta data");
field13.setObjectId("dd31e0408f3d4b059f57f3e154963d00");
  List<CustomFieldVisibility> cfvList13 = new ArrayList<CustomFieldVisibility>();
 
CustomFieldVisibility cfv131 = new CustomFieldVisibility();
cfv131.setRoleId("1");
cfv131.setAttribute("HIDDEN");
cfvList13.add(cfv131);
  CustomFieldVisibility cfv132 = new CustomFieldVisibility();
cfv132.setRoleId("2");
cfv132.setAttribute("VISIBLE");
cfvList13.add(cfv132);
  CustomFieldVisibility cfv133 = new CustomFieldVisibility();
cfv133.setRoleId("3");
cfv133.setAttribute("READ_ONLY");
cfvList13.add(cfv133);
CustomFieldVisibility cfv134 = new CustomFieldVisibility();
cfv134.setRoleId("1714555710");
cfv134.setAttribute("HIDDEN");
cfvList13.add(cfv134);
field13.setCustomFieldVisibility(cfvList13);
return field13;
</syntaxhighlight>
</syntaxhighlight>
<noinclude>
<noinclude>

Revision as of 18:06, 12 October 2011

Learn more: Java API:Customize

addFieldMetaData

Description
Adds Field Metadata
Syntax
Functions.addFieldMetaData(FieldMetaDataBean fmdb);
Return
None

updateFieldMetaData

Description
Updates Field Metadata
Syntax
Functions.updateFieldMetaData(FieldMetaDataBean fmdb);
Return
None

deleteFieldMetaData

Description
Deletes Field Metadata
Syntax
Functions.deleteFieldMetaData(FieldMetaDataBean fieldId);
Return
None
Example
ggetFieldMetaDataMap("LJObject");;

getFieldMetaData

Description
Gets Field Metadata
Syntax
getFieldMetaData(String objectName,String fieldName); 
Return
Field bean metadata
Example
getFieldMetaData("LJObject","field_name"); 

getFieldMetaDataMap

Description
Gets a Field Metadata Map
Syntax
getFieldMetaDataMap(String objectName);
Return
Metadata map for all fields
Example
getFieldMetaDataMap("LJObject");

Payload Examples

Payload examples for the use case: Add Fields Metadata of the specified Field Display Types to an Object.

Considerations
  • The setObjectId() method in FieldMetaDataBean accepts object ID only. (Object name doesn't work.)

Check Box

<syntaxhighlight lang="java" enclose="div">

FieldMetaDataBean field11 = new FieldMetaDataBean(); field11.setTitle("API Check Box"); field11.setTableColumn("api_check_box"); field11.setType("BOOLEAN"); field11.setUniversalProperty(true); field11.setDescription("Check Box through JAVA API"); field11.setExtendedFieldMetaData("Extendedmeta data"); field11.setObjectId("dd31e0408f3d4b059f57f3e154963d00");

List<CustomFieldVisibility> cfvList11 = new ArrayList<CustomFieldVisibility>();
 CustomFieldVisibility cfv111 = new CustomFieldVisibility();

cfv111.setRoleId("1"); cfv111.setAttribute("HIDDEN"); cfvList11.add(cfv111);

CustomFieldVisibility cfv112 = new CustomFieldVisibility();

cfv112.setRoleId("2"); cfv112.setAttribute("VISIBLE"); cfvList11.add(cfv112);

CustomFieldVisibility cfv113 = new CustomFieldVisibility(); cfv113.setRoleId("3"); cfv113.setAttribute("READ_ONLY"); cfvList11.add(cfv113);

CustomFieldVisibility cfv114 = new CustomFieldVisibility();

cfv114.setRoleId("1714555710"); cfv114.setAttribute("HIDDEN"); cfvList11.add(cfv114);

 field11.setCustomFieldVisibility(cfvList11);

return field11; </syntaxhighlight>

Currency

<syntaxhighlight lang="java" enclose="div">

FieldMetaDataBean field6 = new FieldMetaDataBean(); field6.setTitle("API Currency"); field6.setTableColumn("api_currency"); field6.setType("CURRENCY"); field6.setUniversalProperty(true); field6.setMaxFractionalDigits(4); field6.setDisplayLength(35); field6.setDescription("Currency Field through JAVA API"); field6.setExtendedFieldMetaData("Extendedmeta data"); field6.setObjectId("dd31e0408f3d4b059f57f3e154963d00");

List<CustomFieldVisibility> cfvList6 = new ArrayList<CustomFieldVisibility>();
 CustomFieldVisibility cfv61 = new CustomFieldVisibility();

cfv61.setRoleId("1"); cfv61.setAttribute("HIDDEN"); cfvList6.add(cfv61);

 CustomFieldVisibility cfv62 = new CustomFieldVisibility();

cfv62.setRoleId("2"); cfv62.setAttribute("VISIBLE"); cfvList6.add(cfv62);

 CustomFieldVisibility cfv63 = new CustomFieldVisibility();

cfv63.setRoleId("3"); cfv63.setAttribute("READ_ONLY"); cfvList6.add(cfv63);

 CustomFieldVisibility cfv64 = new CustomFieldVisibility();

cfv64.setRoleId("1714555710"); cfv64.setAttribute("HIDDEN"); cfvList6.add(cfv64);

 field6.setCustomFieldVisibility(cfvList6);

fmdb.add(field6);

  field6.setCustomFieldVisibility(cfvList6);

return field6; </syntaxhighlight>

Date

<syntaxhighlight lang="java" enclose="div">

FieldMetaDataBean field18 = new FieldMetaDataBean(); field18.setTitle("API Date"); field18.setTableColumn("api_date"); field18.setType("DATE"); field18.setUniversalProperty(true); field18.setDescription("Date field through JAVA API"); field18.setExtendedFieldMetaData("Extendedmeta data"); field18.setObjectId("dd31e0408f3d4b059f57f3e154963d00");

 List<CustomFieldVisibility> cfvList18 = new ArrayList<CustomFieldVisibility>();
 CustomFieldVisibility cfv181 = new CustomFieldVisibility();

cfv181.setRoleId("1"); cfv181.setAttribute("HIDDEN"); cfvList18.add(cfv181);

 CustomFieldVisibility cfv182 = new CustomFieldVisibility();

cfv182.setRoleId("2"); cfv182.setAttribute("VISIBLE"); cfvList18.add(cfv182);

CustomFieldVisibility cfv183 = new CustomFieldVisibility(); cfv183.setRoleId("3"); cfv183.setAttribute("READ_ONLY"); cfvList18.add(cfv183);

 CustomFieldVisibility cfv184 = new CustomFieldVisibility();

cfv184.setRoleId("1714555710"); cfv184.setAttribute("HIDDEN"); cfvList18.add(cfv184);

field18.setCustomFieldVisibility(cfvList18);

return field18; </syntaxhighlight>

DateTime

<syntaxhighlight lang="java" enclose="div">

FieldMetaDataBean field12 = new FieldMetaDataBean(); field12.setTitle("API Date Time"); field12.setTableColumn("api_date_time"); field12.setType("DATETIME"); field12.setUniversalProperty(true); field12.setDescription("Date Time through JAVA API"); field12.setExtendedFieldMetaData("Extendedmeta data"); field12.setObjectId("dd31e0408f3d4b059f57f3e154963d00");

 List<CustomFieldVisibility> cfvList12 = new ArrayList<CustomFieldVisibility>();
  CustomFieldVisibility cfv121 = new CustomFieldVisibility();

cfv121.setRoleId("1"); cfv121.setAttribute("HIDDEN"); cfvList12.add(cfv121);

CustomFieldVisibility cfv122 = new CustomFieldVisibility(); cfv122.setRoleId("2"); cfv122.setAttribute("VISIBLE"); cfvList12.add(cfv122);

CustomFieldVisibility cfv123 = new CustomFieldVisibility();

cfv123.setRoleId("3"); cfv123.setAttribute("READ_ONLY"); cfvList12.add(cfv123);

 CustomFieldVisibility cfv124 = new CustomFieldVisibility();

cfv124.setRoleId("1714555710"); cfv124.setAttribute("HIDDEN"); cfvList12.add(cfv124);

field12.setCustomFieldVisibility(cfvList12);

return field12; </syntaxhighlight>

Double Field

<syntaxhighlight lang="java" enclose="div">

FieldMetaDataBean field10 = new FieldMetaDataBean(); field10.setTitle("API Double Field"); field10.setTableColumn("api_double_field"); field10.setType("DOUBLE"); field10.setUniversalProperty(true); field10.setMaxFractionalDigits(5); field10.setDisplayLength(30); field10.setDescription("Double Field through JAVA API"); field10.setExtendedFieldMetaData("Extendedmeta data"); field10.setObjectId("dd31e0408f3d4b059f57f3e154963d00"); List<CustomFieldVisibility> cfvList10 = new ArrayList<CustomFieldVisibility>();

CustomFieldVisibility cfv101 = new CustomFieldVisibility();

cfv101.setRoleId("1"); cfv101.setAttribute("HIDDEN"); cfvList10.add(cfv101);

CustomFieldVisibility cfv102 = new CustomFieldVisibility();

cfv102.setRoleId("2"); cfv102.setAttribute("VISIBLE"); cfvList10.add(cfv102);

CustomFieldVisibility cfv103 = new CustomFieldVisibility();

cfv103.setRoleId("3"); cfv103.setAttribute("READ_ONLY"); cfvList10.add(cfv103);

CustomFieldVisibility cfv104 = new CustomFieldVisibility(); cfv104.setRoleId("1714555710"); cfv104.setAttribute("HIDDEN"); cfvList10.add(cfv104); field10.setCustomFieldVisibility(cfvList10); return field10; </syntaxhighlight>

Email Address

<syntaxhighlight lang="java" enclose="div">

FieldMetaDataBean field5 = new FieldMetaDataBean(); field5.setTitle("API Email Address"); field5.setTableColumn("api_mail_address"); field5.setType("LEAD_EMAIL"); field5.setUniversalProperty(true); field5.setMaxStorageLength(50); field5.setDisplayLength(35); field5.setDescription("Email address through JAVA API"); field5.setExtendedFieldMetaData("Extendedmeta data"); field5.setObjectId("dd31e0408f3d4b059f57f3e154963d00");

List<CustomFieldVisibility> cfvList5 = new ArrayList<CustomFieldVisibility>();
  CustomFieldVisibility cfv51 = new CustomFieldVisibility();

cfv51.setRoleId("1"); cfv51.setAttribute("HIDDEN"); cfvList5.add(cfv51);

CustomFieldVisibility cfv52 = new CustomFieldVisibility();

cfv52.setRoleId("2"); cfv52.setAttribute("VISIBLE"); cfvList5.add(cfv52);

 CustomFieldVisibility cfv53 = new CustomFieldVisibility();

cfv53.setRoleId("3"); cfv53.setAttribute("READ_ONLY"); cfvList5.add(cfv53);

CustomFieldVisibility cfv54 = new CustomFieldVisibility(); cfv54.setRoleId("1714555710"); cfv54.setAttribute("HIDDEN"); cfvList5.add(cfv54);

field5.setCustomFieldVisibility(cfvList5); return field5; </syntaxhighlight>

Look Up

<syntaxhighlight lang="java" enclose="div">

FieldMetaDataBean field9 = new FieldMetaDataBean(); IDBean idbean = new IDBean(); field9.setTitle("API Look Up"); field9.setTableColumn("api_look_up"); field9.setType("LOOKUP"); field9.setUniversalProperty(true); idbean.setValue("9d86c06bd9974f35bdfc9c3b155ea21c"); field9.setLookUpObjectId(idbean);

   // field9.setLookupPresetFilter(( First Name equals John ) and ( Date Created greater than 4/23/2010 ));

field9.setIsMasterDetailRelationship(false); field9.setPostSelectionJS("alert('You have selected record :' + name) ;"); field9.setDescription("Look Up through JAVA API"); field9.setExtendedFieldMetaData("Extendedmeta data"); field9.setObjectId("dd31e0408f3d4b059f57f3e154963d00");

  LookupPresetFilters lpf = new LookupPresetFilters();

lpf.setCriteria_1_pre_bracket("("); lpf.setCriteria_1_column("field_name"); lpf.setCriteria_1_operator("equals"); lpf.setCriteria_1_value("John"); lpf.setCriteria_1_post_bracket(")"); lpf.setCriteria_2_join_operator("and"); lpf.setCriteria_2_pre_bracket("("); lpf.setCriteria_2_column("date_created "); lpf.setCriteria_2_operator("greater than"); lpf.setCriteria_2_value("4/23/2010"); lpf.setCriteria_2_post_bracket(")");

 field9.setLookupPresetFilter(lpf);
  List<CustomFieldVisibility> cfvList9 = new ArrayList<CustomFieldVisibility>();
  CustomFieldVisibility cfv91 = new CustomFieldVisibility();

cfv91.setRoleId("1"); cfv91.setAttribute("HIDDEN"); cfvList9.add(cfv91);

 CustomFieldVisibility cfv92 = new CustomFieldVisibility();

cfv92.setRoleId("2"); cfv92.setAttribute("VISIBLE"); cfvList9.add(cfv92);

 CustomFieldVisibility cfv93 = new CustomFieldVisibility();

cfv93.setRoleId("3"); cfv93.setAttribute("READ_ONLY"); cfvList9.add(cfv93);

 CustomFieldVisibility cfv94 = new CustomFieldVisibility();

cfv94.setRoleId("1714555710"); cfv94.setAttribute("HIDDEN"); cfvList9.add(cfv94);

  field9.setCustomFieldVisibility(cfvList9);

return field9; </syntaxhighlight>

Multi-Select Check Box

<syntaxhighlight lang="java" enclose="div">

FieldMetaDataBean field15 = new FieldMetaDataBean(); field15.setTitle("API Multi Check Box"); field15.setTableColumn("api_multi_chk_box"); field15.setType("MULTI_CHECK_BOX"); field15.setUniversalProperty(true); field15.setDescription("Multi Check Box through JAVA API"); field15.setExtendedFieldMetaData("Extendedmeta data"); field15.setObjectId("dd31e0408f3d4b059f57f3e154963d00"); EnumerationDetailsBean eD2 = new EnumerationDetailsBean();

   eD2.setShowFirstValueAsDefault(false);

eD2.setSortFlag(false); List<EnumerationDetailsBean.EnumerationItemBean> eIList1 = new ArrayList<EnumerationDetailsBean.EnumerationItemBean>();

EnumerationDetailsBean.EnumerationItemBean eI1 = new EnumerationDetailsBean.EnumerationItemBean(); eI1.setPicklistLabel("1"); eI1.setPicklistValue("a"); eI1.setTextColor("#000000"); eI1.setTextBgColor("#FFFFFF"); eI1.setShowOnlyImage(false); eI1.setFlagIsOptgroup(false);

eIList1.add(eI1); EnumerationDetailsBean.EnumerationItemBean eI11 = new EnumerationDetailsBean.EnumerationItemBean(); eI11.setPicklistLabel("2"); eI11.setPicklistValue("b"); eI11.setTextColor("#000000"); eI11.setTextBgColor("#FFFFFF"); eI11.setShowOnlyImage(false); eI11.setFlagIsOptgroup(false); eIList1.add(eI11); EnumerationDetailsBean.EnumerationItemBean eI12 = new EnumerationDetailsBean.EnumerationItemBean(); eI12.setPicklistLabel("3"); eI12.setPicklistValue("c"); eI12.setTextColor("#000000"); eI12.setTextBgColor("#FFFFFF"); eI12.setShowOnlyImage(false); eI12.setFlagIsOptgroup(false); eIList1.add(eI12); eD2.setEnumerationItems(eIList1); field15.setEnumerationDetails(eD2); List<CustomFieldVisibility> cfvList15 = new ArrayList<CustomFieldVisibility>(); CustomFieldVisibility cfv151 = new CustomFieldVisibility(); cfv151.setRoleId("1"); cfv151.setAttribute("HIDDEN"); cfvList15.add(cfv151); CustomFieldVisibility cfv152 = new CustomFieldVisibility(); cfv152.setRoleId("2"); cfv152.setAttribute("VISIBLE"); cfvList15.add(cfv152);

CustomFieldVisibility cfv153 = new CustomFieldVisibility(); cfv153.setRoleId("3"); cfv153.setAttribute("READ_ONLY"); cfvList15.add(cfv153);

CustomFieldVisibility cfv154 = new CustomFieldVisibility(); cfv154.setRoleId("1714555710"); cfv154.setAttribute("HIDDEN"); cfvList15.add(cfv154);

 field15.setCustomFieldVisibility(cfvList15);

return field15; Global Pick List

FieldMetaDataBean field16 = new FieldMetaDataBean();

field16.setTitle("API Global Pick List"); field16.setTableColumn("api_global_pick_list"); field16.setType("GLOBAL_PICK_LIST"); field16.setUniversalProperty(true); IDBean idbean1 = new IDBean(); idbean1.setValue("case_reason"); field16.setGlobalPicklistId(idbean1); field16.setDescription("Global Pick list through JAVA API"); field16.setExtendedFieldMetaData("Extendedmeta data"); field16.setObjectId("dd31e0408f3d4b059f57f3e154963d00");

List<CustomFieldVisibility> cfvList16 = new ArrayList<CustomFieldVisibility>();
 CustomFieldVisibility cfv161 = new CustomFieldVisibility();

cfv161.setRoleId("1"); cfv161.setAttribute("HIDDEN"); cfvList16.add(cfv161);

CustomFieldVisibility cfv162 = new CustomFieldVisibility();

cfv162.setRoleId("2"); cfv162.setAttribute("VISIBLE"); cfvList16.add(cfv162);

CustomFieldVisibility cfv163 = new CustomFieldVisibility();

cfv163.setRoleId("3"); cfv163.setAttribute("READ_ONLY"); cfvList16.add(cfv163);

 CustomFieldVisibility cfv164 = new CustomFieldVisibility();

cfv164.setRoleId("1714555710"); cfv164.setAttribute("HIDDEN"); cfvList16.add(cfv164);

field16.setCustomFieldVisibility(cfvList16);

return field16; </syntaxhighlight>

Number

<syntaxhighlight lang="java" enclose="div">

FieldMetaDataBean field2 = new FieldMetaDataBean(); field2.setTitle("API Number"); field2.setTableColumn("api_number"); field2.setType("NUMBER"); field2.setUniversalProperty(true); field2.setMaxStorageLength(50); field2.setDisplayLength(35); field2.setMinNumericValue(-2147483648); field2.setMaxNumericValue(2147483647); field2.setDescription("Text field through JAVA API"); field2.setExtendedFieldMetaData("Extended meta data"); field2.setObjectId("dd31e0408f3d4b059f57f3e154963d00");

List<CustomFieldVisibility> cfvList2 = new ArrayList<CustomFieldVisibility>();

CustomFieldVisibility cfv11 = new CustomFieldVisibility(); cfv11.setRoleId("1"); cfv11.setAttribute("HIDDEN"); cfvList2.add(cfv11);

CustomFieldVisibility cfv12 = new CustomFieldVisibility(); cfv12.setRoleId("2"); cfv12.setAttribute("VISIBLE"); cfvList2.add(cfv12);

CustomFieldVisibility cfv13 = new CustomFieldVisibility(); cfv13.setRoleId("1"); cfv13.setAttribute("HIDDEN"); cfvList2.add(cfv13);

CustomFieldVisibility cfv14 = new CustomFieldVisibility(); cfv14.setRoleId("1714555710"); cfv14.setAttribute("HIDDEN"); cfvList2.add(cfv14);

field2.setCustomFieldVisibility(cfvList2); return field2; </syntaxhighlight>

Percent

<syntaxhighlight lang="java" enclose="div">
  FieldMetaDataBean field17 = new FieldMetaDataBean();

field17.setTitle("API Percent"); field17.setTableColumn("api_percent"); field17.setType("PERCENT"); field17.setUniversalProperty(true); field17.setMaxFractionalDigits(2); field17.setDisplayLength(35); field17.setDescription("Percentage field through JAVA API"); field17.setExtendedFieldMetaData("Extendedmeta data"); field17.setObjectId("dd31e0408f3d4b059f57f3e154963d00");

List<CustomFieldVisibility> cfvList17 = new ArrayList<CustomFieldVisibility>();
 CustomFieldVisibility cfv171 = new CustomFieldVisibility();

cfv171.setRoleId("1"); cfv171.setAttribute("HIDDEN"); cfvList17.add(cfv171);

 CustomFieldVisibility cfv172 = new CustomFieldVisibility();

cfv172.setRoleId("2"); cfv172.setAttribute("VISIBLE"); cfvList17.add(cfv172);

CustomFieldVisibility cfv173 = new CustomFieldVisibility();

cfv173.setRoleId("3"); cfv173.setAttribute("READ_ONLY"); cfvList17.add(cfv173);

CustomFieldVisibility cfv174 = new CustomFieldVisibility(); cfv174.setRoleId("1714555710"); cfv174.setAttribute("HIDDEN"); cfvList17.add(cfv174);

 field17.setCustomFieldVisibility(cfvList17);

return field17; </syntaxhighlight>

Phone/Fax

<syntaxhighlight lang="java" enclose="div">

FieldMetaDataBean field3 = new FieldMetaDataBean(); field3.setTitle("API Phone Fax"); field3.setTableColumn("api_phone_fax"); field3.setType("PHONE"); field3.setUniversalProperty(true); field3.setMaxStorageLength(50); field3.setDisplayLength(35); field3.setDescription("Phone field through JAVA API"); field3.setExtendedFieldMetaData("Extendedmeta data"); field3.setObjectId("dd31e0408f3d4b059f57f3e154963d00");

List<CustomFieldVisibility> cfvList3 = new ArrayList<CustomFieldVisibility>();

CustomFieldVisibility cfv31 = new CustomFieldVisibility(); cfv31.setRoleId("1"); cfv31.setAttribute("HIDDEN"); cfvList3.add(cfv31);

CustomFieldVisibility cfv32 = new CustomFieldVisibility(); cfv32.setRoleId("2"); cfv32.setAttribute("VISIBLE"); cfvList3.add(cfv32);

CustomFieldVisibility cfv33 = new CustomFieldVisibility(); cfv33.setRoleId("4"); cfv33.setAttribute("READ_ONLY"); cfvList3.add(cfv33);

CustomFieldVisibility cfv34 = new CustomFieldVisibility(); cfv34.setRoleId("1714555710"); cfv34.setAttribute("HIDDEN"); cfvList3.add(cfv34);

field3.setCustomFieldVisibility(cfvList3); return field3; </syntaxhighlight>

Pick List

<syntaxhighlight lang="java" enclose="div">

FieldMetaDataBean field8 = new FieldMetaDataBean(); field8.setTitle("API Pick List"); field8.setTableColumn("api_pick_list"); field8.setType("PICK_LIST"); field8.setUniversalProperty(true); field8.setDescription("Pick List through JAVA API"); field8.setExtendedFieldMetaData("Extendedmeta data"); field8.setObjectId("dd31e0408f3d4b059f57f3e154963d00");

EnumerationDetailsBean eD = new EnumerationDetailsBean();

eD.setShowFirstValueAsDefault(false); eD.setSortFlag(false); field8.setEnumerationDetails(eD);

List<CustomFieldVisibility> cfvList8 = new ArrayList<CustomFieldVisibility>();
 CustomFieldVisibility cfv81 = new CustomFieldVisibility();

cfv81.setRoleId("1"); cfv81.setAttribute("HIDDEN"); cfvList8.add(cfv81);

CustomFieldVisibility cfv82 = new CustomFieldVisibility();

cfv82.setRoleId("2"); cfv82.setAttribute("VISIBLE"); cfvList8.add(cfv82);

CustomFieldVisibility cfv83 = new CustomFieldVisibility();

cfv83.setRoleId("3"); cfv83.setAttribute("READ_ONLY"); cfvList8.add(cfv83);

CustomFieldVisibility cfv84 = new CustomFieldVisibility();

cfv84.setRoleId("1714555710"); cfv84.setAttribute("HIDDEN"); cfvList8.add(cfv84); field8.setCustomFieldVisibility(cfvList8); return field8; </syntaxhighlight>

RadioButton

<syntaxhighlight lang="java" enclose="div">

FieldMetaDataBean field14 = new FieldMetaDataBean(); field14.setTitle("Api RadioButton"); field14.setTableColumn("api_rdbutton"); field14.setType("RADIO_BUTTON"); field14.setObjectId("dd31e0408f3d4b059f57f3e154963d00");

EnumerationDetailsBean eD1 = new EnumerationDetailsBean(); eD1.setShowFirstValueAsDefault(false); eD1.setSortFlag(false); List<EnumerationDetailsBean.EnumerationItemBean> eIList = new

 ArrayList<EnumerationDetailsBean.EnumerationItemBean>();  
  

EnumerationDetailsBean.EnumerationItemBean eI = new EnumerationDetailsBean.EnumerationItemBean(); eI.setPicklistLabel("label1"); eI.setPicklistValue("value1"); eI.setTextColor("#FFFFFF"); eI.setTextBgColor("#000000"); eI.setShowOnlyImage(false); eI.setFlagIsOptgroup(false);

  eIList.add(eI);

EnumerationDetailsBean.EnumerationItemBean eI1 = new EnumerationDetailsBean.EnumerationItemBean(); eI1.setPicklistLabel("label2"); eI1.setPicklistValue("value2"); eI1.setTextColor("#FFFFFF"); eI1.setTextBgColor("#000000"); eI1.setShowOnlyImage(false); eI1.setFlagIsOptgroup(false);

   eIList.add(eI1);
   

EnumerationDetailsBean.EnumerationItemBean eI2 = new EnumerationDetailsBean.EnumerationItemBean(); eI2.setPicklistLabel("label3"); eI2.setPicklistValue("value3"); eI2.setTextColor("#FFFFFF"); eI2.setTextBgColor("#000000"); eI2.setShowOnlyImage(false); eI2.setFlagIsOptgroup(false);

   eIList.add(eI2); 

eD1.setEnumerationItems(eIList); field14.setEnumerationDetails(eD1); List<CustomFieldVisibility> cfvList14 = new ArrayList<CustomFieldVisibility>(); CustomFieldVisibility cfv141 = new CustomFieldVisibility(); cfv141.setRoleId("1"); cfv141.setAttribute("HIDDEN"); cfvList14.add(cfv141);

   CustomFieldVisibility cfv142 = new CustomFieldVisibility();

cfv142.setRoleId("2"); cfv142.setAttribute("VISIBLE"); cfvList14.add(cfv142);

 CustomFieldVisibility cfv143 = new CustomFieldVisibility();

cfv143.setRoleId("3"); cfv143.setAttribute("READ_ONLY"); cfvList14.add(cfv143);

CustomFieldVisibility cfv144 = new CustomFieldVisibility();

cfv144.setRoleId("1714555710"); cfv144.setAttribute("HIDDEN"); cfvList14.add(cfv144);

 field14.setCustomFieldVisibility(cfvList14);

return field14; </syntaxhighlight>

RichText Area

<syntaxhighlight lang="java" enclose="div">

FieldMetaDataBean field4 = new FieldMetaDataBean(); field4.setTitle("API Rich Text Area"); field4.setTableColumn("api_rich_text_area"); field4.setType("RICHTEXT_AREA"); field4.setUniversalProperty(true); field4.setWidth(500); field4.setDescription("Rich Text Area through JAVA API"); field4.setExtendedFieldMetaData("Extendedmeta data"); field4.setObjectId("dd31e0408f3d4b059f57f3e154963d00");

List<CustomFieldVisibility> cfvList4 = new ArrayList<CustomFieldVisibility>();

CustomFieldVisibility cfv41 = new CustomFieldVisibility(); cfv41.setRoleId("1"); cfv41.setAttribute("HIDDEN"); cfvList4.add(cfv41);

CustomFieldVisibility cfv42 = new CustomFieldVisibility(); cfv42.setRoleId("2"); cfv42.setAttribute("VISIBLE"); cfvList4.add(cfv42);

CustomFieldVisibility cfv43 = new CustomFieldVisibility(); cfv43.setRoleId("3"); cfv43.setAttribute("READ_ONLY"); cfvList4.add(cfv43);

CustomFieldVisibility cfv44 = new CustomFieldVisibility(); cfv44.setRoleId("1714555710"); cfv44.setAttribute("HIDDEN"); cfvList4.add(cfv44);

field4.setCustomFieldVisibility(cfvList4); return field4; </syntaxhighlight>

Text Area

<syntaxhighlight lang="java" enclose="div">

FieldMetaDataBean field1 = new FieldMetaDataBean(); field1.setTitle("API Name"); field1.setTableColumn("api_name"); field1.setType("TEXT_FIELD"); field1.setUniversalProperty(true); field1.setMaxStorageLength(50); field1.setDisplayLength(29); field1.setDescription("Text field through JAVA API"); field1.setExtendedFieldMetaData("Extendedmeta data"); field1.setObjectId("dd31e0408f3d4b059f57f3e154963d00"); List<CustomFieldVisibility> cfvList1 = new ArrayList<CustomFieldVisibility>();

CustomFieldVisibility cfv1 = new CustomFieldVisibility(); cfv1.setRoleId("1"); cfv1.setAttribute("HIDDEN"); cfvList1.add(cfv1);

CustomFieldVisibility cfv2 = new CustomFieldVisibility(); cfv2.setRoleId("2"); cfv2.setAttribute("VISIBLE"); cfvList1.add(cfv2);

CustomFieldVisibility cfv3 = new CustomFieldVisibility(); cfv3.setRoleId("1"); cfv3.setAttribute("HIDDEN"); cfvList1.add(cfv3);

CustomFieldVisibility cfv4 = new CustomFieldVisibility(); cfv4.setRoleId("1714555710"); cfv4.setAttribute("HIDDEN"); cfvList1.add(cfv4);

field1.setCustomFieldVisibility(cfvList1); return field1; </syntaxhighlight>

Time

<syntaxhighlight lang="java" enclose="div">

FieldMetaDataBean field13 = new FieldMetaDataBean(); field13.setTitle("API Time"); field13.setTableColumn("api_time"); field13.setType("TIME"); field13.setUniversalProperty(true); field13.setDescription("Time through JAVA API"); field13.setExtendedFieldMetaData("Extendedmeta data"); field13.setObjectId("dd31e0408f3d4b059f57f3e154963d00");

  List<CustomFieldVisibility> cfvList13 = new ArrayList<CustomFieldVisibility>();

CustomFieldVisibility cfv131 = new CustomFieldVisibility(); cfv131.setRoleId("1"); cfv131.setAttribute("HIDDEN"); cfvList13.add(cfv131);

 CustomFieldVisibility cfv132 = new CustomFieldVisibility();

cfv132.setRoleId("2"); cfv132.setAttribute("VISIBLE"); cfvList13.add(cfv132);

 CustomFieldVisibility cfv133 = new CustomFieldVisibility();

cfv133.setRoleId("3"); cfv133.setAttribute("READ_ONLY"); cfvList13.add(cfv133);

CustomFieldVisibility cfv134 = new CustomFieldVisibility();

cfv134.setRoleId("1714555710"); cfv134.setAttribute("HIDDEN"); cfvList13.add(cfv134);

field13.setCustomFieldVisibility(cfvList13);
return field13;

</syntaxhighlight>