0
thaithiendi created
Dear support Team,
I want to return An success alert when created entity successfuly. I use OnPostAsync action on Modal and AbpModalButtons.Save
- ABP Framework version: v5.3.3
- UI type: MVC
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
- Exception message and stack trace:
- Steps to reproduce the issue:"
2 Answer(s)
-
1
Hi,
You can listen to the
onResult
event for this.See: https://docs.abp.io/en/abp/5.2/UI/AspNetCore/Modals#saving-the-modal
Where you open the create modal, you can listen to the modal's
onResult
event by using the modal's variable (for instance:productCreateModal
) like below:productCreateModal.onResult(function(){ console.log(arguments); // check response and show a message if the response is successful. abp.message.success(l('CreateProductSuccessMessage')) .then(data => window.location.href = "/Products"); });
-
0
Thanks berkansasmaz , It's really helpful for me.