ObjectGears Help

Forum   ObjectGears (Version:

Create and save data into a class

This example creates a new record and saves it into class ID 100.

var drNew = OG.DataRow.CreateNew( 100);
drNew.SetText( 30, 'name');
OG.DataRow.SaveData( drNew);

This example creates a new record in the current model in class 'find-text'and inserts values in three columns.

var cl = OG.ClassDef.GetByCode( OGModel.Id, 'find-text');
var dr = OG.DataRow.CreateNew(cl.Id);
dr['text'] = 'My_text';
dr['find-user'] = OG.Person.GetLoginPerson().ToPersonInfo();
dr['language'] = OG.GetActualLocalize();

This website is using cookies files to provide services and analyse visits. You agree with that by using this website.     Further information