[Form]
public class DDD_ViewContracts extends FormRun
{
[DataSource]
class DDD_ViewContractsView
{
public void init()
{
if(element.args().record())
{
SalesTable salesTable = element.args().record();
super();
Query q = DDD_ViewContractsView_ds.query();
QueryBuildDataSource rootDS = q.dataSourceTable(tablenum(DDD_ViewContractsView));
rootDS.clearRanges();
QueryBuildRange range = rootDS.addRange(fieldnum(DDD_ViewContractsView, CustAccount));
range.value(SysQuery::value(salesTable.CustAccount));
range.status(RangeStatus::Locked);
if(salesTable.InventLocationId)
{
range = rootDS.addRange(fieldnum(DDD_ViewContractsView, LocationId));
range.value(SysQuery::value(salesTable.InventLocationId));
range.status(RangeStatus::Locked);
}
}
}
}
}
No comments:
Post a Comment