Confirmation after successful data add

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
ebinnasir
User
Posts: 103

Confirmation after successful data add

Post 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 .


arbei
User
Posts: 9286

Post by arbei »

You may try the Row_Inserted server event of the master table.


mobhar
User
Posts: 11660

Post 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.!");


ebinnasir
User
Posts: 103

Post 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?


mobhar
User
Posts: 11660

Post by mobhar »

SweetAlert2 is Javascript code, you should put it in Startup Script, not in Server Events.


Post Reply