I have a button on the Sales Quotation Line which opens a dialog form where a specific price will be selected and upon clicking “Ok” the line will update the unit price field (SalesQuotationLine.SalesPrice) with the selected price.
I am using the below code to store the selected record in args so that it can be brought back over to the SalesQuotationTable form. And that is where I get confused. I am not sure where I am supposed to do the updating. How do I know that the dialog value is coming back to the caller form? Do I need a new method that does the update? When the dialog form is closed is it using init of the sales quote form again?
[FormControlEventHandler(formControlStr(MJMPriceToolBreaks, CommandButtonOK), FormControlEventType::Clicked)]
public static void CommandButtonOK_OnClicked(FormControl sender, FormControlEventArgs e)
{
Args args = new Args();
FormRun fr = sender.formRun();
FormDataSource pricing_ds = fr.dataSource(formDataSourceStr(MJMPriceToolBreaks, MJMPricingTmp));
MJMPricingTmp pricingTmp = pricing_ds.cursor();
args.record(pricingTmp);
args.caller(sender);
}