Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
jan_g
Posts: 4
Registered: ‎07-15-2008
My Device: Not Specified

EntryID for Tasks [BES+Exchange]

Hi,

 

I'm working on a way to determine the Exchange's EntryID of a Email/Appointment/Task based on the BlackBerry RefID. (when you open an Email/Appointment/Task on the device and type ALT+VIEW you can see the RefID).

 

So far I was able to find out how the BES maps the RefIDs to the EntryIDs for Emails and Appointments, but Tasks seem to work a little different. Anyone know where this is stored?

 

BlackBerry Employee
dmoscrop
Posts: 2
Registered: ‎12-16-2008
My Device: Not Specified

Re: EntryID for Tasks [BES+Exchange]

Do you mind elabourating a bit on your goals here? I may be a bit off your direction, but...

 

You're attempting to gather the EntryID for the item from the device? Or are you simply taking the RefID from the device and you're trying to find it on the server side by querying the message store?

 

Utilizing MAPI it's relatively trivial to get the EntryID for an item with a given RefID and it should be the same across all PIM items, I will double check when I get to work tomorrow...

 

Keep in mind that the EntryID is only good for that MAPI session as far as I understand... I've never bothered with longterm EID because all my stuff has never been cross-session.

 

If you are using MAPI, RefID is a named property and as such you have to get the property value using the appropriate methods (I can post examples). So you would need to getIdsFromNames on PR_RIM_MSG_REF_ID with the appropriate clsid, change the PROP_TYPE to the appropriate type, then when you SetRestriction you can make it an equals comparison to the refid perceived on the device (keeping in mind that the device shows it as a signed value but I don't know if it's stored that way... I'm vaguely recalling that it's actually unsigned.. shouldn't really matter?)

 

 So anyway, if you're using MFCMAPI to look at the tag for PR_RIM_MSG_REF_ID it could be different from one contents table to the next as far as I know. I'll post again tomorrow with more concrete details and perhaps by then you can elabourate as to how you're doing this and maybe even why :smileyhappy:

New Developer
jan_g
Posts: 4
Registered: ‎07-15-2008
My Device: Not Specified

Re: EntryID for Tasks [BES+Exchange]

Hi, that is exactly what I was talking about.

However, only emails have a PR_RIM_MSG_REF_ID property - tasks do not and I don't think you can find the RefID for tasks in the MessageStore. Well, I discovered the table 'SyncExchangeState' in the BES database, which seems to contain the EntryIDs for tasks, so I might already have a solution for my problem :smileyhappy: