//Gets the running SalesEditLines form
[FormControlEventHandler(formControlStr(SalesCreateQuotation, OK), FormControlEventType::Clicked)]
public static void OK_OnClicked(FormControl sender, FormControlEventArgs e)
{
boolean ret = true;
Args args = new Args();
FormCommandButtonControl callerButton = sender as FormCommandButtonControl;
FormControlEventArgs formControlEventArgs = e as FormControlEventArgs;
DialogButton diagBut;
str amountvalue = int2str(25);//pass the total amount value
//Retrieves the button that we're reacting to
FormRun form = callerButton.formRun(); //Gets the running SalesEditLines form
//Get the salesId that was selected in the SalesEditLines form
FormDataSource salesQuotationTable_ds = form.dataSource(formDataSourceStr(SalesCreateQuotation, SalesQuotationTable )) as FormDataSource;
SalesQuotationTable salesQuotationTable = salesQuotationTable_ds.cursor();
str strMessage = strfmt("Please confirm Customer Reference '%1' is correct.", salesQuotationTable.CustomerRef);
str strTitle = "Customer Reference Confirmation.";
diagBut = Box::yesNo(strMessage, dialogButton::No, strTitle);
if (diagBut == DialogButton::No)
{
ret = checkFailed("Provide the correct Customer Reference to proceed.");
//here is where i need the code to prevent the SalesCreateQuotation from closing
}
else if(diagBut == DialogButton::Yes)
{
ret = true;
}
else
{
ret = checkFailed("Operation canceled.");
}
}
André Arnaud de Cal...
292,886
Super User 2025 Season 1
Martin Dráb
231,766
Most Valuable Professional
nmaenpaa
101,156
Moderator