Uploaded image for project: 'OpenICF'
  1. OpenICF
  2. OPENICF-1024

SF Connector: Unable to query via QueryFilter whose attribute value contains a single quote

    Details

      Description

      Querying Salesforce Users via QueryFilter using the Equality operand and a value containing a single quote results in a failure.  For example, given a Salesforce User whose Username is Amalea.O'Kelly@goldengate.com, the following request will fail:

      GET http://localhost:8080/openidm/system/00Dq00000001QDD/User?_queryFilter=Username eq "Amalea.O'Kelly@goldengate.com"

       

      Salesforce response:

      Caused by: org.identityconnectors.framework.common.exceptions.ConnectorException: Error: 400
      [{"message":"\nUser WHERE (Username = 'Amalea.O'Kelly@goldengate.com')\n ^\nERROR at Row:1:Column:4252\nexpecting a right parentheses, found 'Kelly'","errorCode":"MALFORMED_QUERY"}]

      Attribute values specified within QueryFilters must be escaped prior to being dispatched with in a SOQL query request. See the following list of Quoted String Escape Sequences.

       

        Attachments

          Activity

            People

            • Assignee:
              cgdrake Chris Drake
              Reporter:
              cgdrake Chris Drake
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: