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?
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.