void executeQuery()
{
QueryBuildDataSource qbds = this.query().dataSourceNo(1);
FieldId fieldId;
ItemId itemId;
InventModelGroupItem _inventmodelgroupitem;
InventModelGroup inventmodelgroup;
InventTable InventTable;
DataAreaId datacompany;
if (#PdsShelfEnabled)
{
itemId = inventDimFormSetup.callerItemId();
}
fieldId = inventDimFormSetup.callerItemFieldId();
if (fieldId)
{
if (! qbds.dynalinkCount())
{
qbds.addDynalink(
fieldNum(InventBatch,ItemId),
inventDimFormSetup.callerItemIdFormDatasource().cursor(),
fieldId);
}
}
else
{
if (inventDimFormSetup.hasCallerItemId())
{
qbds.addRange(fieldNum(InventBatch,ItemId)).value(queryValue(inventDimFormSetup.callerItemId()));
}
}
if (#PdsShelfEnabled)
{
if (inventDimFormSetup
&& itemId
&& InventTable::find(itemId).pdsCheck())
{
qbds.sortClear();
if (InventTable::find(itemId).modelGroup().PdsPickCriteria == PdsPickCriteria::ExpiryDate)
{
qbds.addSortField(fieldNum(InventBatch,ExpDate));
}
else
{
qbds.addSortField(fieldNum(InventBatch,PdsBestBeforeDate));
}
qbds.addSortField(fieldNum(InventBatch,InventBatchId));
}
}
super();
}
André Arnaud de Cal... 291,642 Super User 2024 Season 2
Martin Dráb 230,371 Most Valuable Professional
nmaenpaa 101,156