Use a queryExpression and condition to build a query to retrieve the
incident where the attributename is your ticketnumber fieldname,
operator is conitionoperator.equal, and values is the value of your
ticket number. Set the columnset to allcolumns. pass all of that
into a conditionexpression which you assign to your query.
Then pass the query into crmservice retrievemultiple.
A businessentities collection will be returned. Cast it to an
incident. Then retrieve the field incidentid.