Back to all

Retrieving UDF's when Raeding Cases

I have tried to us the same syntax as when I am searching an AbEntry but i get an error back:

"Message": "Object: \"Case\" of type CaseObject doesn't support property \"Udf/$NAME(HQ-Name)\".",  
      "ErrorCode": -1023

Here is my code:

{
  "Case": {
    "Criteria": {
      "SearchQuery": {
        "Number": {
          "$EQ": "HQ-00840"
        }
      },
      "Top": 1
    },
    "Scope": {
      "Fields": {
        "Key": 1,
        "CaseNumber": 1,
        "Subject": 1,
        "Description": 1,
        "Owner": {
          "Uid": 1,
          "Value": 1
        },
        "Age": 1,
        "Reason": {
          "Key": 1,
          "DisplayValue": 1
        },
        "Product": [
          {
            "Key": 1,
            "DisplayValue": 1
          }
        ],
        "AssignedTo": {
          "Key": 1,
          "DisplayValue": 1
        },
        "Udf/$NAME(HQ Name)": 1,
        "Udf/$NAME(HQ Dropbox Link)": 1,
        "Udf/$NAME(HQ AB Dropbox Link)": 1
      }
    }
  },
  "Configuration": {
    "Drivers": {
      "ICustomerServiceSearcher": "Maximizer.Model.Access.Sql.CustomerServiceSearcher"
    }
  }
}

This works for AbEntry:

        "FirstName": 1,
        "LastName": 1,
        "Fullname": 1,
        "Udf/$NAME(Pre Quote\\Address Remove Periods)": 1,
        "Udf/$NAME(EST-WO Numbers\\Current HQ)": 1

So why not for Cases.

As an aside, your sample code in the Octopus reference material would benefit from the inclusion of sample UDF's in the code.