Display Success Message With Back Button On Dynamics 365 Portal

Introduction

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.

Requirement

Display a specific message after case submission with a back button to go back to the case list in the Dynamics 365 portal.

Solution

To implement the above requirement, we need to do the following two tasks.

  1. Configure entity form to display a success message.
  2. Add a Custom button to the case form.

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.

Configure entity form to display a success message

  1. Navigate to Portals-> Entity Forms and open Customer Service – Create Case entity form.
  2. Change On Success Settings like below.
    Success Settings
  3. Navigate to Additional Settings and add your Success Message.
    Additional Settings
  4. Save and Close your changes.

Add a Custom button to the case form

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.

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.

Liquid page

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.

Success message

And, when we click this button it will redirect us to the case list.

Hope it will help someone!


Similar Articles
HIMBAP
We are expert in Microsoft Power Platform.