> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to list all selected interests for a contact

> How to list all selected interests for a contact using entities

You can list all selected [interests][1] for a specific contact using the `ContactInterestHelper` class.

You can achieve the same with the `PersonInterestHelper` class.

The helper classes provide the functionality that combines the MDO lists and what to select (they combine entity sub-collections with MDO lists).

## Code

```csharp theme={null}
using SuperOffice;
using SuperOffice.CRM.Entities;
using SuperOffice.CRM.Lists;
using (SoSession newSession = SoSession.Authenticate("sam", "sam"))
{
  //Retrieve a Contact Based on the Contact ID
  Contact newContact = Contact.GetFromIdxContactId(10);

  //Get the list of heading items that are currently selected,
  // (have link rows to the parent entity)
  List<ISoListHeading> newLstHdItms = newContact.InterestHelper.SelectedHeadingItems;

  //Get the list of root items that are currently selected,
  // (have link rows to the parent entity)
  List<ISoListItem> newLstItms = newContact.InterestHelper.SelectedRootItems;
}
```

## Walk-through

In the code above, once we have created an instance of the `Contact` entity by using the `Contact` class, we use the contact's `InterestHelper` to retrieve the selected interests. As shown above, we can retrieve the interest in 2 ways:

* using the `SelectHeadingItems` property
* using the `SelectRootItems` property

[1]: ../../../../company/dev/index#interests


## Related topics

- [How to list all selected interests for a contact (services)](/en/api/web-services/howto/company/get-interests-for-contact-services.md)
- [How to set an interest on or off for a contact (services)](/en/api/web-services/howto/company/set-interest-on-off-services.md)
- [How to set a user-defined list item on a Udef field (services)](/en/api/web-services/howto/custom-objects/set-udef-listitem-value.md)
- [List interests for a person](/en/automation/crmscript/howto/contact/get-interests.md)
- [Interests](/en/automation/crmscript/howto/interests/index.md)
- [Set/clear interest on contact](/en/automation/crmscript/howto/interests/contact-interests.md)
- [NSContactEntity](/en/automation/crmscript/reference/CRMScript.NetServer.NSContactEntity.md)
