form query

Hi, I have here the code and it is working, but than i make new record in itemsTrans, somehow it calls items table method insert() and gives me that when i was entering record, there is missing some mandatory fields. I think it is because i have added datasource items table to itemsTrans form, and innerjoin linktype to itemsTrans table for it. So maybe this is a problem. How can i resolve this problem?

code:

public void executeQuery()

{

QueryBuildRange qbr1;

QueryBuildRange qbr2;

Query query;

Query query1;

;

qbr1 = SysQuery::findOrCreateRange(

this.query().dataSourceTable(tablenum(GIR_IT_Items)),

fieldnum(GIR_IT_Items, statusNew));

qbr2 = SysQuery::findOrCreateRange(

this.query().dataSourceTable(tablenum(GIR_IT_ItemsTrans)),

fieldnum(GIR_IT_ItemsTrans, Operation));

if (CtrlShowLast.value())

{

qbr1.value(SysQuery::value(GIR_IT_item_status::Isduotas));

qbr2.value(SysQuery::value(“ISDAVIMAS_VARTO”));

}

else

{

qbr1.value(SysQuery::valueUnlimited());

qbr2.value(SysQuery::valueUnlimited());

}

super();

}

//////////

public boolean modified()

{

boolean ret;

;

ret = super();

if (ret)

{

GIR_IT_ItemsTrans_ds.executeQuery();

}

return ret;

}