In service portal, if you have a reference field that is made mandatory in the dictionary, the form widget is producing a javascript error when any UI action is clicked.
The form does submit successfully however when the widget refreshes, a javascript error is thrown.

Here is the error message:
TypeError: field.mandatory_filled is not a function
at Object.getReferenceLabelContents (VM164582 js_includes_sp.jsx:63651)
at ChildScope.scope.getReferenceLabelContents (VM164582 js_includes_sp.jsx:63605)
at fn (eval at compile (VM164582 js_includes_sp.jsx:13095), <anonymous>:4:336)
at expressionInputWatch (VM164582 js_includes_sp.jsx:14052)
at Scope.$digest (VM164582 js_includes_sp.jsx:14713)
at Scope.$apply (VM164582 js_includes_sp.jsx:14816)
at done (VM164582 js_includes_sp.jsx:11439)
at completeRequest (VM164582 js_includes_sp.jsx:11556)
at XMLHttpRequest.requestLoaded (VM164582 js_includes_sp.jsx:11506)

Steps to Reproduce

1. In a kingston instance open the incident form in the platform UI.
2. right-click the field label for the Caller field and choose Configure Dictionary
3. Check "Mandatory" on the record and hit save.

4. Open an incident in the form widget in service portal (for example /sp?id=form&table=incident&sys_id=9c573169c611228700193229fff72400)
5. Make sure that the caller field has a value and click save.

Expected: Process completes with no issues
Actual: Javascript error is thrown when the widget refreshes


The workaround for this is to avoid making reference fields mandatory at the dictionary level, instead use a UI policy or client script to make them mandatory. 


The problem has been fixed in London. Please upgrade to London for the solution.

Please refer to the below KB article for steps to upgrade if required:

Related Problem: PRB1269430

Seen In

There is no data to report.

Fixed In


Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-05-21 11:40:04