Hi,
In my case I needs to add the purchTable as range but I dont want to add the table in that form datasource.
I added the below code in the PurchLine init().
public void init()
{
Query query = new Query();
QueryBuildDataSource purchTableDS,purchLineDS;
QueryBuildRange activityNum,purchStatus;
ProjBudgetLine projBudgetLine;
Query queryDB;
QueryBuildDataSource qbdsPurchLine;
QueryBuildDataSource qbdsPurchTable;
super();
projBudgetLine = element.args().record();
qbdsPurchLine = this.query().dataSourceTable(tableNum(PurchLine));
qbdsPurchLine.addRange(fieldnum(PurchLine, ActivityNumber)).value(queryvalue(projBudgetLine.ActivityNumber));
qbdsPurchTable = qbdsPurchLine.addDataSource(tableNum(PurchTable));
qbdsPurchTable.addLink(fieldNum(PurchTable, PurchId), fieldNum(PurchLine, PurchId));
qbdsPurchTable.addRange(fieldnum(PurchTable, DocumentStatus)).value(queryValue(DocumentStatus::PurchaseOrder));
}
In my case I needs to add the purchTable as range but I dont want to add the table in that form datasource.
I added the below code in the PurchLine init().
public void init()
{
Query query = new Query();
QueryBuildDataSource purchTableDS,purchLineDS;
QueryBuildRange activityNum,purchStatus;
ProjBudgetLine projBudgetLine;
Query queryDB;
QueryBuildDataSource qbdsPurchLine;
QueryBuildDataSource qbdsPurchTable;
super();
projBudgetLine = element.args().record();
qbdsPurchLine = this.query().dataSourceTable(tableNum(PurchLine));
qbdsPurchLine.addRange(fieldnum(PurchLine, ActivityNumber)).value(queryvalue(projBudgetLine.ActivityNumber));
qbdsPurchTable = qbdsPurchLine.addDataSource(tableNum(PurchTable));
qbdsPurchTable.addLink(fieldNum(PurchTable, PurchId), fieldNum(PurchLine, PurchId));
qbdsPurchTable.addRange(fieldnum(PurchTable, DocumentStatus)).value(queryValue(DocumentStatus::PurchaseOrder));
}
No comments:
Post a Comment