how to display a error or warning message on the workitem with javascript / dojo ?
Hello,
In RTC, when we forget a mandatory field when creating a workitem, we have a nice red message at the top of the workitem screen.
Is it possible, in a Validator or DefaultValue or CalculatedValue script, to display a message of this type in the same place?
How to access the DOM of the RTC page from javascript?
Through dojo?
The real question is : is it possible, in (by example), a condition Script, to access the DOMof the current page displayed by RTC? I wanted to have access to a html element an be able to modify his innerHtml by document.getElementById("xx").innerHtml or some stuff like that.
One answer
One solution :
I know it's HORRIBLE and please, use it ONLY if you have no other solution :)
In my javascript I use a code like this :
let balise = document.getElementsByClassName("validationMessageAnchor")[1];
balise.innerHTML = '<span style="display:block;.....etc...
This display a message just after the workitem type and Id on the top of the workitem screen.
I know,I know.... it's BAD and not durable !!!!
Sorry. :)
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Feb 20 '19, 11:56 a.m.I know that some have added hover information to the work item web UI using a theme. I have no example and I am convinced that you should stay well within the limits of https://jazz.net/wiki/bin/view/Main/AttributeValueProviders .