I've coded a method to query a queue's (related)mailbox state. In order to do that I need to pass down the queue's related mailbox Guid - "mailboxid". The mailbox in this case is a link-entity.
At the moment I can get the Guid of that queue easily using the below cast. But I'm wondering how I can retrieve the Guid of the queue's mailbox.
Question:
How can I retrieve/cast the Guid of a link entity?
Sample cast on queue Guid:
int selectedIndexQueue = unenabledMailboxQueueListBox.SelectedIndex;
Entity selectedQueue = UnenabledMailBoxQueueStringList[selectedIndexQueue];
Guid selectedQueueGuid = (Guid)selectedQueueMailbox.Attributes["queueid"];
FetchXML (detailing the query on related unenabled mailboxes of queues):
<?xml version="1.0"?>
-<fetch distinct="false" mapping="logical" output-format="xml-platform" version="1.0">
-<entity name="queue">
<attribute name="name"/>
<attribute name="emailaddress"/>
<attribute name="queueid"/>
<order descending="false" attribute="name"/>
-<link-entity name="mailbox" alias="ab" to="defaultmailbox" from="mailboxid">
-<filter type="and">
<condition attribute="statecode" value="1" operator="eq"/>
</filter>
</link-entity>
</entity>
</fetch>
*This post is locked for comments
I have the same question (0)