Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public string GetPersonFromEmail()
- {
- string result = "";
- using (SoSession session = SoSession.Authenticate("db", "db"))
- {
- using (ArchiveAgent agent = new ArchiveAgent())
- {
- result = "";
- List<SuperOffice.CRM.ArchiveLists.ArchiveRestrictionInfo> restrictions = new List<SuperOffice.CRM.ArchiveLists.ArchiveRestrictionInfo>();
- //SuperOffice.CRM.ArchiveLists.ArchiveRestrictionInfo
- SuperOffice.CRM.ArchiveLists.ArchiveRestrictionInfo personrestriction = new SuperOffice.CRM.ArchiveLists.ArchiveRestrictionInfo("person/email/emailAddress", "=", "dabo03@gmail.com");
- restrictions.Add(personrestriction);
- ArchiveListItem[] persons = agent.GetArchiveListByColumns(SuperOffice.CRM.ArchiveLists.FindContactProvider.ProviderName, new string[] { "personId" }, null, restrictions.ToArray(), null, 0, 1);
- result = persons[0].EntityName;
- }
- }
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement