Hi Team,
with the previous requirement if checkbox(Show Partial Salesorder) is enable then, it was required to show the record of sales line with “prod status completed” as a filter in the load planning work bench form. so below was the code which was working fine
qbdsSalesLine = this.query().dataSourceTable(tableNum(SalesLine));
if(!showPartialSalesOrders.checked())
{
qbdsProdTable = qbdsSalesLine.addDataSource(tableNum(ProdTable));
qbdsProdTable.addLink(fieldNum(SalesLine, InventRefId), fieldNum(ProdTable, ProdId));
qbdsProdTable.relations(false);
qbdsProdTable.joinMode(JoinMode::InnerJoin);
qbdsProdTable.addRange(fieldNum(ProdTable, ProdStatus)).value(enum2Str(ProdStatus::Completed));
}
but now the requirement again changed
in which if the checkbox(Show Partial Salesorder) is unchecked then it will check the prodstatus of all the salesline. if it the status is completed for all the lines then only it will show all the lines records else it should not show anything in the load planning work bench form.
i am not getting how i will put condition to check all the line records with prod status completed. as i cannot add the range here.
please suggest any valuable solution.
Thanx in advance.