How do I retrieve the incidentid for an incident?

How do I retrieve the incidentid for an incident?

Post by a21hcmt2ZW » Sat, 08 Aug 2009 09:56:02


Hi,

I was wondering if anyone knows how to retrieve the incidentid for an
incident?
I can select an incident with a ticketnumber but I am not sure how to get
the incidentid.

I would like to get the incidentid so then I can lookup an annotation by
using that incidentid.

Thanks,
--
Kevin Markvenas
 
 
 

How do I retrieve the incidentid for an incident?

Post by Andy » Fri, 14 Aug 2009 03:38:04

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.