I need to programmatically (C#) get information about all cases, their in-place holds, and sources.
Looks like classes from the Microsoft.Office.Server.Discovery namespace are the only way to get the info I need, however I stuck with a problem - whenever I try to access the Sources_Client property of the SourceGroup class I get the InvalidCastException.
SPWeb web = ...
Case cs = new Case(web);
SourceGroup sgroup = cs.SourceGroups[0];
SourceCollection sources = sgroup.Sources_Client;
Can you please help me out with this? Is there any other way to list the cases and their detailed information?
Looks like classes from the Microsoft.Office.Server.Discovery namespace are the only way to get the info I need, however I stuck with a problem - whenever I try to access the Sources_Client property of the SourceGroup class I get the InvalidCastException.
SPWeb web = ...
Case cs = new Case(web);
SourceGroup sgroup = cs.SourceGroups[0];
SourceCollection sources = sgroup.Sources_Client;
Can you please help me out with this? Is there any other way to list the cases and their detailed information?