Hello,
I have a datasource on the form which is not joined to any other datasource. I'd like to set a cursor on particular record upon form opening. How can I do this? I tried to do the following in init and executequery methods of the form datasoiurce extension but this is not working. However range works fine and I can the value in projid field on the form but when I try to update any field form this record. IN projTable validatewrite() method projtable record is empty which means I don't have cursor set up on the datasource
[ExtensionOf(FormDataSourceStr(ProjValSetupEmplProj, ProjectTable))]
internal final class BWProjValSetupEmplProjProjectTableDS_Extension
{
void init()
{
next init();
if (element.args().dataset() == tableNum(ProjTable))
{
QueryBuildDataSource qbdsProjectTable;
ProjTable projTable = element.args().record();
qbdsProjectTable = this.querybuilddatasource();
qbdsProjectTable.addRange(fieldNum(ProjTable,ProjID)).value(queryValue(projTable.projid));
//this.cursor(projTable);
//this.findrecord(projTable);
}
}
public void executeQuery()
{
ProjTable projTable = element.args().record();
this.findrecord(projTable);
next executeQuery();
}