RequestedByUser Field in Cireson Portal
I have recently been in discussion with a few customers about the possibility of adding in the RequestedByUser field onto a WorkItem form. Currently, this does not work due to the field having the same target name as CreatedByUser, both which share the property name "CreatedWorkItem”. This is an issue in the Microsoft coding.
(NOTE: You can use your own custom Type Projection, but note 2 things:
- The type projection must not include the RequestedByUser and CreatedByUser relationships
- You must find the Id of this type projection and change the variable in the RequestedByUser.js code)
The CustomForm.txt contains the code to be added to your custom form for Incident.js/ServiceRequest.js
The RequestedByUser.js can either be copied directly to your Custom.js file inside CustomSpace, or loaded in using something like a script loader.
Once you have downloaded these files, perform the following:
- Import the provided management pack (recommended)
- Copy CustomForm.txt code into the Incident.js or ServiceRequest.js custom form code as needed
- Copy the RequestedByUser.js code to Custom.js or load it using a script loader
You should then notice the CreatedByUser and RequestedByUser fields now can exist on the same WorkItem form without error!
Hopefully this helps to solve a common Microsoft issue 😁