Related Work Item Status Broken with Custom Incident.js
When I rename/remove that file and reload the site, the Status shows correctly for any linked WIs.
However, I need to have the custom js file there because it is used to bring in customizations that we've added to our Incident form that are not there out of the box (Affected Asset Location, Affected Asset Room, Affected Asset Description)
When I first created this Incident.js file, I was using the example file that was located here: \CiresonPortal\CustomSpaceExamples Looking at that directory now, it appears that the new example file is different than what I was using and doesn't appear to contain any information about the "Related Items" tab.
This is what I have in my Incident.js file in the Related Items tab section if you think it would help troubleshoot:
/*********/<br> /** TAB **/<br> /*********/<br> {<br> name: "RelatedItems",<br> content: [<br> {<br> customFieldGroupList: [<br> {<br> name: "RelatedConfigurationItems",<br> type: "relatedItems"<br> },<br> {<br> name: "ChildWorkIems",<br> type: "childWorkItems"<br> },<br> {<br> name: "FileAttachments",<br> type: "fileAttachments"<br> },<br> {<br> name: "WorkItems",<br> type: "multipleObjectPicker",<br> PropertyName: "RelatesToWorkItem",<br> ClassId: "f59821e2-0364-ed2c-19e3-752efbb1ece9",<br> PropertyToDisplay: {Id:"Id",Title:"Title",Status:"Status", LastModified:"LastModified"},<br> SelectableRow: true,<br> SelectProperty: "Id"<br> }<br><br> ]<br> }<br> ]<br> },
Best Answer
-
Geoff_Ross Cireson Consultant O.G.Hi Chris,
There's a change to the way the multipleObjectPicker works in v6+. It can now pick up any property from a object in the view model and bring to the grid.
For Enums, like Status, you therefore now have to specify you want the name property with "Status.Name". So that whole picker object should look like{ name: "WorkItems", type: "multipleObjectPicker", PropertyName: "RelatesToWorkItem", ClassId: "f59821e2-0364-ed2c-19e3-752efbb1ece9", PropertyToDisplay: {Id:"Id",Title:"Title","Status.Name":"Status", LastModified:"LastModified"}, SelectableRow: true, SelectProperty: "Id" }
You have a couple of options.
1. Go though all your form customisations, and add in the property name.
2. Grab the new v6 OOB form files found in CiresonPortal\Scripts\forms\templates, copy these over the top of the ones in custom space and then re-modify as needed.
3. Merge your custom with the new OOB ones. Probably just a case of copying any multipleObjectPickers from the OOB files to your customs ones - but you need to watch out for the java-script syntax.
4. If its just this one multipleObjectPicker on just IR you are having a problem with, then just copy this code above into yours, replacing the equivalent section.
Geoff2
Answers
There's a change to the way the multipleObjectPicker works in v6+. It can now pick up any property from a object in the view model and bring to the grid.
For Enums, like Status, you therefore now have to specify you want the name property with "Status.Name". So that whole picker object should look like
You have a couple of options.
1. Go though all your form customisations, and add in the property name.
2. Grab the new v6 OOB form files found in CiresonPortal\Scripts\forms\templates, copy these over the top of the ones in custom space and then re-modify as needed.
3. Merge your custom with the new OOB ones. Probably just a case of copying any multipleObjectPickers from the OOB files to your customs ones - but you need to watch out for the java-script syntax.
4. If its just this one multipleObjectPicker on just IR you are having a problem with, then just copy this code above into yours, replacing the equivalent section.
Geoff
Geoff, you've been an amazing help today. This was the solution I went with (I forgot about that folder and was only focused on the 'examples' folder, and it did the trick!