• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Edit
Show / Hide Table of Contents

Create a contact row

Some tooltip text!
• 1 minute to read
 • 1 minute to read

To create a ContactRow we use the SuperOffice.CRM.Rows namespace.

The following example shows how we make create a contact using the ContactRow class.

Code

using SuperOffice.CRM.Rows;
using SuperOffice;
using(SoSession mySession = SoSession.Authenticate("sam", "sam"))
{
  //Instantiate a ContactRow type
  ContactRow newContact = ContactRow.CreateNew();

  //Assign values to the instantiated ContactRow
  newContact.SetDefaults();
  newContact.Name = "EuroCenter";
  newContact.OrgNr = "1234523";
  newContact.Number1 = "7412885";

  //Saving the ContactRow
  newContact.Save();
}

Walk-through

The first step is to instantiate the ContactRow class and then the next step is to set the default values of it with the SetDefaults method.

ContactRow newContact = ContactRow.CreateNew();
newContact.SetDefaults();

To access individual properties exposed through the ContactRow class we use statements like this:

newContact.Name = "EuroCenter";

Calling Save() available in the ContactRow class, the instantiated ContactRow will be saved in to the contact table.

In This Article
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top