Find a contact using a udef field
Audience:
Some tooltip text!
• 1 minute to read
• 1 minute to read
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.
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() is a private helper method that you can easily add to your code.