Create new form, add temptable as DataSource.
DS-> Init()
public void init() // init method of form data source.
{
CustGroupTmp tmpTable;
super();
tmpTable.CustGroupId= "Test1";
tmpTable.insert();
tmpTable.CustGroupId= "Test2";
tmpTable.insert();
CustGroupTmp.linkPhysicalTableInstance(tmpTable); // CustGroupTmp is the form datasource name this cursor
//or
CustGroupTmp.setTmpData(tmpTable
);
TableType should be: InMemory
}
work in class inserting temptable records.
// to use the same logic in the class, pass the formDatasource-
CustGroupTmp to class
if (_args.record().TableId == tableNum(CustGroupTmp))
{
FormDataSource formDS = _args.caller().datasource(formDataSourceStr(CustGroupTmpForm, CustGroupTmp)) as FormDataSource;
CustGroupTmp = formDS.cursor();
formDS.executeQuery();
}
// FormDataSource fds
// CustGroupTmp custGroupTempBuffer = fds.cursor()
// custGroupTempBuffer.linkPhysicalTableInstance(tmpTable);
No comments:
Post a Comment
Give me the commetns and solutions