Remedy tickets using arsys java api

1.3k views Asked by At

Using the Remedy client I can view information about tickets of my group, but I tried to get the same information using arsys java api without any good result. I got the fileds names, but can't get the data entries of the fields. I am interested in a table content I get when I click a button of the form. Here is some code:

   `ctx.setServer(serverName);
    ctx.setUser(userName);
    ctx.setPassword(userPassword);
    try {
        ctx.verifyUser();
        //Auth. OK
        List<Field> fields = ctx.getListFieldObjects("NO Main Control Panel");
        System.out.println(fields.size());
        for(int i=0; i<fields.size(); i++){
            System.out.println(fields.get(i).getName());
        }
        int[] ids = new int[fields.size()];
        int index = 0;
        for (Field field : fields) {
             ids[index++] = field.getFieldID();
        }
       String strQualifier = "'Ticket Id TT'=\"NO0000001128408\"";
       QualifierInfo officiallyQualified = ctx.parseQualification("NO Main Control Panel", strQualifier);
       List<Entry> entries = ctx.getListEntryObjects("NO Main Control Panel",
               officiallyQualified, 0, Constants.AR_NO_MAX_LIST_RETRIEVE, null, ids, true, null);
        System.out.println(entries.size());

    } catch (ARException e) {
        System.out.println(e.getMessage());
    }` 

Here is some of the errors I got:

ERROR (286): Display only fields cannot be included in a query to the database;       536871034

Thanks in advance

3

There are 3 answers

0
woytech On

Please specify more details about the form (OOTB/custom) and the field that you include in your query. Please check in the Developer tool if the field 'Ticket Id TT' is display only.

0
mkv On

The error means that you can not use a display only field in your qualification. From your code it looks like Field Ticket Id TT has id 536871034. The field is probably filled from a different source field. Try to look a the workflow for displaying the record.

0
JoSSte On

Display Only fields do not store any value in the database - any field used in a query should be a regular field.

if you are in doubt, refer to the database reference on the BMC documentation site http://docs.bmc.com