Get a contact through entities layer
Some tooltip text!
• 1 minute to read
• 1 minute to read
Getting a contact through the entities layer is pretty straightforward. You need to import the SuperOffice.CRM.Entities
namespace.
The following example shows how it is done.
using SuperOffice;
using SuperOffice.CRM.Entities;
using(SoSession mySession = SoSession.Authenticate("SAL0", ""))
{
//Get a contact through Idx class
Contact contactThroughIdx = Contact.GetFromIdxContactId(3);
//Access the Name property
string name = contactThroughIdx.Name;
}
When retrieving a Contact
entity through an Idx class, you have to pass the ID of the entity. Then all its properties will be retrieved from the database and kept in memory. This allows you to access the properties.
You can alternatively use the services layer.