8

I'm trying to get a list of the available users from the Core Service. I spend quite some time looking at the available service methods and the most obvious seemed to be this:

TrusteesFilterData trusteesFilterData = new TrusteesFilterData
                                        {
                                            BaseColumns = ListBaseColumns.IdAndTitle,
                                            IsPredefined = false,
                                            ItemType = ItemType.User
                                        };
XElement listTrustees = client.GetSystemWideListXml(trusteesFilterData);

However, the code throws an error when calling GetSystemWideListXml - Unable to create Abstract Class. Am I using the correct approach and, if so what am I doing wrong? If not, what should I be doing instead?

Jeremy Grand-Scrutton
  • 2,802
  • 14
  • 20

1 Answers1

9

Take a look at the samples in the open source project for workflow notification

http://code.google.com/p/tridion-notification-framework/source/browse/NotificationService/NotificationService/Worker.cs

Lines 22 - 26 in the DoWork() method should do what you need - I think need to use UsersFilterData rather than TrusteesFilterData

var users = client.GetSystemWideList(new UsersFilterData { BaseColumns = ListBaseColumns.IdAndTitle, IsPredefined = false });
Kevin Brydon
  • 12,524
  • 8
  • 46
  • 76
Chris Summers
  • 10,153
  • 1
  • 21
  • 46