Post

2 followers Follow
0
Avatar

Code examples for RetrieveMultipleMessage ?

Hello,

   I have read through all the API documentation I can find, and I am not seeing any code showing use of RetrieveMultipleMessage.  The API Guide PDF talks about it in general, but provides no examples.  Can you point me to somewhere the code is being used?

The use case is I am just trying to pull all my active projects.

Import from old forum Answered

Please sign in to leave a comment.

3 comments

0
Avatar

Hi Rob. 

First I'd like to refer you the Web Services Reference where you can find a description of the RetrieveMultipleMessage and RetrieveMultipleResult classes and their properties. 

The typical usage of RetrieveMultiple would be if you already have the IDs of several projects.

However, if you're trying to retrieve information about your active projects (I assume you don't have their IDs in advance), I believe MyWorkItemsQuery or WorkItemsQuery will better suite your needs.

Hope this helps

Ophir

Clarizen Team 0 votes
Comment actions Permalink
0
Avatar

[quote=Ophir Kenig]Hi Rob. 

First I'd like to refer you the Web Services Reference where you can find a description of the RetrieveMultipleMessage and RetrieveMultipleResult classes and their properties. 

The typical usage of RetrieveMultiple would be if you already have the IDs of several projects.

However, if you're trying to retrieve information about your active projects (I assume you don't have their IDs in advance), I believe MyWorkItemsQuery or WorkItemsQuery will better suite your needs.

Hope this helps

Ophir
[/quote]

Ophir, thanks for your reply.  Unfortunately, the Web Service Reference guide only talks about RetrieveMultipleMessage in general terms, and includes no codes samples.

I am starting out by trying to pull my project info using MyWorkItemsQuery.  I can't figure out how to pull the ID (I need to update these later), from the reference guide, it looks like I should be using "Entity" as the external ID, but when I add that to the fields I want to return the query fails (tried EntityID as well).  How do I do this?

Also, I want to pull at the distinct task names that are assigned to me, is there a way to do that through the API, it does not seem like EntityQuery allows this.  I see info about the "QueryExpression" class, but no documentation (other than Web service Dev guide, which is not helpful), and no code samples.

Thanks,

Rob

Import from old forum 0 votes
Comment actions Permalink
0
Avatar

Hi Rob.

The various API Queries return a QueryResult _object.  the  _QueryResult _object's _Entities property is an an array of GenericEntity each containing an Id property with the entity Id. 

You don't have to explicitly request for the Id in the query Fields, it's always retrieved automatically. 

Using MyWorkItemsQuery _(or _WorkItemsQuery), you can retrieve tasks assigned to you by setting the ItemsFilter property of the Query object to IAmAResource.

Hope this helps,

Ophir

Clarizen Team 0 votes
Comment actions Permalink