How to check attribute's behaviour (mandatory or not mandatory).
Hi,
Based on attribute behavior i.e., if an attribute is mandatory, I have to do some operation. This is mainly using Javascript(Dojo). It is equivalent to reading a workitem's attribute behavior.
getValue: function(attribute, workItem, configuration) {
// using workItem.getX() or configuration.getX(), can we read the attribute behavior.
}
Is there a way to achieve this using Javascript (Attribute Customization - Scripts based value). Or we have to use API Extension. Kindly guide me on this.
Thanks.
Accepted answer
An attribute can be read-only based on the values of other attributes during the save, so I doubt that you can determine whether it is read-only when in the editor.
Comments
1 vote
One other answer
You can determine that in the Java Server API, but not with attribute customization (at least not with any published API). See https://rsjazz.wordpress.com/2015/08/07/a-custom-condition-to-make-attributes-required-or-read-only-by-role-version-2/
I would not touch that if I could avoid it, as it is really an ugly construct. In addition I agree with Donald, that you should use the mechanisms the UI provides and stay with them.
Why I post examples that I would suggest not using? Because users won't listen.
Also see https://rsjazz.wordpress.com/2016/07/15/rtc-process-customization-what-you-can-and-cannot-do/