Advertisement
Guest User

Untitled

a guest
May 25th, 2015
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.11 KB | None | 0 0
  1.      public string  GetPersonFromEmail()
  2.         {
  3.             string result = "";
  4.  
  5.             using (SoSession session = SoSession.Authenticate("db", "db"))
  6.             {
  7.                 using (ArchiveAgent agent = new ArchiveAgent())
  8.                 {
  9.  
  10.                     result = "";
  11.                     List<SuperOffice.CRM.ArchiveLists.ArchiveRestrictionInfo> restrictions = new List<SuperOffice.CRM.ArchiveLists.ArchiveRestrictionInfo>();
  12.                     //SuperOffice.CRM.ArchiveLists.ArchiveRestrictionInfo
  13.                     SuperOffice.CRM.ArchiveLists.ArchiveRestrictionInfo personrestriction = new SuperOffice.CRM.ArchiveLists.ArchiveRestrictionInfo("person/email/emailAddress", "=", "dabo03@gmail.com");
  14.  
  15.                     restrictions.Add(personrestriction);
  16.                     ArchiveListItem[] persons = agent.GetArchiveListByColumns(SuperOffice.CRM.ArchiveLists.FindContactProvider.ProviderName, new string[] { "personId" }, null, restrictions.ToArray(), null, 0, 1);
  17.                     result = persons[0].EntityName;
  18.                 }
  19.  
  20.             }
  21.  
  22.             return result;
  23.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement