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

Retrieve a row through an entity

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

A property of Row type directly refers to a particular row of a table.

For example, in the Sale Entity, the Currency property would refer to the Currency table and would contain the columns that are in the Currency table as its properties.

This example shows how to retrieve the properties of a Currency Row through a Sale Entity.

using SuperOffice;
using SuperOffice.CRM.Entities;
using SuperOffice.CRM.Rows;
using(SoSession mySession = SoSession.Authenticate("SAL0", ""))
{
  //Retrieving an Entity
  Sale newSale = Sale.GetFromIdxSaleId(2);

//Retrieving Properties of a Row through an Entity
  string saleCurname = newSale.Currency.Name;
  if (newSale.Currency.Deleted == 0)
  {
    string saleCurAct = "Sale Currency Active";
  }
  else
  {
    string saleCurInAct = "Sale Currency is deleted";
  }

  string saleCurDB = newSale.Currency.CurrencyTableInfo.DbName;
  string saleCurRate = newSale.Currency.Rate.ToString();
  string saleCurRank = newSale.Currency.Rank.ToString();
  string saleCurRegDate = newSale.Currency.Registered.ToString();
  string saleCurUnits = newSale.Currency.Units.ToString();
}

See also

  • How to retrieve an Entity
  • Retrieve an Entity property through an Entity
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top