Page 1 of 1
Confirmation after successful data add
Posted: Sun May 28, 2023 7:22 am
by ebinnasir
Hi,
I want to show confirmation message after successful data add/entry on master / detail table. I checked the help file and found that setSuccessMessage()
can do that. I wanted to know where i need to copy the below codes?
setSuccessMessage(" Your provided Challan no; $this->challan_no->CurrentValue from company name $this->company _name->CurrentValue has been saved. After verification/Authorization fabric quantity will be available on store.!");
If my above is wrong please suggest me the correct code.
Thanks in advance .
Re: Confirmation after successful data add
Posted: Sun May 28, 2023 9:24 am
by arbei
You may try the Row_Inserted server event of the master table.
Re: Confirmation after successful data add
Posted: Sun May 28, 2023 12:11 pm
by mobhar
That code should be:
$this->setSuccessMessage(" Your provided Challan no " . $rsnew["challan_no"] . " from company name " . $rsnew["company _name"] . " has been saved. After verification/Authorization fabric quantity will be available on store.!");
Re: Confirmation after successful data add
Posted: Sun May 28, 2023 8:08 pm
by ebinnasir
Thanks. It works.
In case i want to show message using sweetalert2, is this below code is correct ?
$this->Swal.fire(' Your provided Challan no ' . $rsnew["challan_no"] . ' from company name ' . $rsnew["received_from"] . ' has been saved. After verification/Authorization fabric quantity will be available on store quantity.!');
do i need to write any condition to identify for successful data entry?
Re: Confirmation after successful data add
Posted: Sun May 28, 2023 8:13 pm
by mobhar
SweetAlert2 is Javascript code, you should put it in Startup Script, not in Server Events.