web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Display a custom button with hyperlink in the form notification

(0) ShareShare
ReportReport
Posted on by 25

Hello Community,

I've got a requirement to show a button with hyperlink along with OOB form notification (similar to Microsoft inbuilt notifications on product form/ Read More buttons on different notifications).

To achieve this, I've gone through Microsoft internal javascript product_main_system_library.js and found an extension to the official form notification concept. I've implemented below code in the same way MS used and it is absolutely working fine without any issues.

function OnLoad(executionContext){

'use strict';

var formContext = executionContext.getFormContext();

var msg = "This is for testing purpose";

var level = "INFO";

var uniqueId = "TEST01"

var link = "">go.microsoft.com/.../

formContext.ui.setFormNotification(msg,level,uniqueId,[{Label: "Read More", Handler: function() {return window.open(link,"_blank")}}]);

}

Even though Microsoft has mentioned only 3 parameters to pass to setFormNotification client API reference in official documentation - https://docs.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/formcontext-ui/setformnotification, they are using 4 parameters in their internal scripts. Can I use the same way to achieve my requirement even though it is no where mentioned in the official documentation? 

I have the same question (0)
  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at
    RE: Display a custom button with hyperlink in the form notification

    Hi,

    This is what we call unsupported customization, you can use but when MS will change their scripts/definition/methods it may stop working that time you need to rework on your code.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 228

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 156 Super User 2025 Season 2

#3
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 149

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans