[FormControlEventHandler(formControlStr(SalesTable, InventoryDimensionsGrid_inventBatchId), FormControlEventType::Validated)]
public static void InventoryDimensionsGrid_inventBatchId_OnValidated(FormControl sender, FormControlEventArgs e)
{
SalesLine salesLine;
InventDim inventDim;
boolean ret;
FormControlCancelEventArgs args = e as FormControlCancelEventArgs;
FormRun formRun = sender.formRun();
FormStringControl batchId = formRun.design(0).controlName("ControlName");
InventBatchId inventBatchId = batchId.text();
select firstonly RecId from salesLine
join inventDim where inventDim.inventDimId == salesLine.InventDimId
&& inventDim.inventBatchId == inventBatchId && inventDim.inventBatchId !=''
&& salesLine.ProductionOrderReference !="";
if(salesLine.RecId)
{
ret = checkFailed("BatchAllocationError");
args.cancel(true);
}
}
No comments:
Post a Comment