> ## 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.

# Find a contact using a udef field

> Find a contact using a user-defined field

This example creates the criteria directly on the client and saves and executes the find in one call.

<Note>
  The code examples on this page use the nuget SOAP proxies, [SuperOffice.NetServer.Services][2].
</Note>

```csharp theme={null}
using SuperOffice;
using SuperOffice.CRM.Services;
using SuperOffice.CRM.ArchiveLists
using(SoSession.Authenticate( "SAL1", "" ))
{
  using(FindAgent agent = new FindAgent())
  {
    string[] fields = new string[1] { "contactUdef/SuperOffice:1" };
    ArchiveRestrictionInfo[] restrictions = agent.GetSpecifiedCriteriaInformationWithDefaults( "Criteria", "findcontact", "associate=12345", fields, null ).Restrictions;
    restrictions[0].Values = new string[1] { "s" };
    restrictions[0].IsActive = true
    FindResults find = agent.FindFromRestrictions( restrictions, "findcontact", 50, 0 );
    DumpResult( find.ArchiveColumns, find.ArchiveRows );
  }
}
```

<Note>
  [DumpResult()][1] is a private helper method that you can easily add to your code.
</Note>

[1]: ../../../search/ifindagent/dump-result

[2]: https://www.nuget.org/packages/SuperOffice.NetServer.Services


## Related topics

- [FindContact](/en/api/archive-providers/reference/findcontact.md)
- [FindSale](/en/api/archive-providers/reference/findsale.md)
- [Custom objects and fields](/en/custom-objects/learn/index.md)
- [How to Search using Find Selections](/en/api/search/find-selection/how-to-search.md)
- [How to create a user-defined field using the web services API](/en/api/web-services/howto/custom-objects/rest-create-udef-field.md)
- [How to delete a user-defined field using the web services API](/en/api/web-services/howto/custom-objects/rest-delete-udef-field.md)
