I am stuck with issue in Lightning. I want to do a field update on record page on click of a button, and will be showing a message to user on successfully updation of that field.
Lets say, I am doing this on Opportunity object. There will be a button on page layout, which will have some logic (if A then Alpha, if B then Beta) for updation of that status field and on click of button, it will update that field and will show a toast(even alert will be ok) to user.
Now, I am able to do this with existing ajax toolkit if we go by traditional approach. Even I succeeded in creating a lightning action, which will update a field(by taking its ID by using force:hasRecordId interface) based on some conditions and have added "window.location.relad()" in its controller to reload it.
However, ideally it should do things in background(without having a window), and refresh/reRender its detail page, so as to show the updated value and on updation, it should show a toast to user.
The main concern is -
- Displaying updated field on detail page(no VF/lightning component) without refreshing the page, so that I can show toast there.
- How to avoid component window, on click of lightning action on record detail page.
If you have any solution please let me know.
Thanks in Advance!