Hi,
I am working on a task where I need to throw an error even if a single SalesQuotationLine has a value for Config Id field.
So, for this I have write code on Onclicked event of confirm Button & the config Id field is coming from InventDim Datasource of SalesQuotationTable Form.
I need to stop the confirmation status of this Quotation & throw error if line has config Id filled with value, but this code is not working as expected.
[FormControlEventHandler(formControlStr(SalesQuotationTable, ButtonUpdateConfirmation), FormControlEventType::Clicked)]
public static void ButtonUpdateConfirmation_OnClicked(FormControl sender, FormControlEventArgs e)
{
InventDim inventDim = sender.formRun().dataSource(4).cursor();
SalesQuotationLine salesQuotationLine = sender.formRun().dataSource(2).cursor();
while select salesQuotationLine join inventDim where inventDim.inventDimId == salesQuotationLine.InventDimId
{
if(inventDim.configId)
{
throw Error(" Is not a product master");
}
}
}

Thanks,
Rahul