Update basic properties of a Row
Some tooltip text!
• 1 minute to read
• 1 minute to read
Before updating a Row, it must be retrieved by using the Idx
class.
This example shows how the properties of a Row are updated.
using SuperOffice;
using SuperOffice.CRM.Rows;
using(SoSession newSession = SoSession.Authenticate("SAL0", ""))
{
//Create a New Row
ContactRow myContactRow = ContactRow.GetFromIdxContactId(125);
//Update the properties of the ContactRow
myContactRow.Name = "Daisy Susan";
myContactRow.CountryId = 12;
if (myContactRow.IsDirty)
{
myContactRow.Save();
}
}
- Get a row from the
contact
table with row ID 125. If such a row does not exist, the instance of theContactRow
will be assigned to null. - Update the
Name
andCountryId
of theContactRow
. - Set the
IsDirty
property to true if there is any change made to that Row. - Call
Save()
to update any changed data in the database.