In this article, we are going to discuss how we can display a success message with a back button on the Dynamics 365 portal web page once the record is submitted.
Display a specific message after case submission with a back button to go back to the case list in the Dynamics 365 portal.
To implement the above requirement, we need to do the following two tasks.
For demo purposes, we are using the vanilla Dynamics 365 portal but you can follow similar steps in your portal. Let’s see how we can implement it.
We are going to add the following button in our Case web template.
<input type="button" value="Back" onclick="onBackClick()" id="BackBtn" class="btn btn-primary"/>
We have added this code right below the entity form tag.
As we only want to show this when our success message is displayed, we have used the following check. To redirect back to the parent page we are using the liquid page object.
So, when we try to create a new case, this button will be hidden but once we submit a case, we will see our success message with a back button like below.
And, when we click this button it will redirect us to the case list.
Hope it will help someone!