ObjectPicker not saving value
I extended my Service Request form to create a link to the Cost Center.
I added a ObjectPicker to the form so users can enter the cost center.
The list is loading correctly and we can select a value. But as soon as we click Apply (or Save), the value disappears.
I can't find what I'm doing wrong.
Relationship in ManagementPack
ServiceRequest.js
{ DataType: "ObjectPicker", PropertyDisplayName: "CostCenter", PropertyName: "Target_df2e0757_0927_44ff_9844_5bd8958fa771", ClassId: "128bdb2d-f5bd-f8b6-440e-e3f7d8ab4858" },
Answers
Did you include the Service-Request-to-Cost-Center relationship in a new Service Request type projection, and did you map that type projection in the "Assign forms to active directory groups" portion of "Admin Settings"?
If you or anyone reading this is unfamiliar, a type projection (sometimes referred to as a combination class in the console) is a grouping of relationships to a base class/module (ie. Incident, Service Request, Hardware Asset). The Portal/Console will load every grid/form using a type projection in order to bring over relationships it needs that are not part of the base class. For example, "Affected User" and "Assigned User" are brought over in many type projections for the Incident Class-- if you wanted to view or update either of these relationships, they would need to be included in the type projection. Ideally, type projections include only the relationships you need because even if not shown on a grid/form, a grid/form will still pull every relationship specified in a type projection (can lead to slowness if bringing over many unneeded relationships for many items).
Thanks,
Nick
Yes I did create a type projection and mapped it in the Form section!
But not sure it's working correctly. Any way to verify this?
Valérie
Changed the PropertyName back to the Target_GUID, and I can now see the value setted by PowerShell.
And for this SR , I can change and update the value and it continues to work as expected.
And same for other SR. I don't know why it started to work now ?
I'm now trying to update this in production. But as I have no idea what made it work, it's a bit difficult
{ DataType: "ObjectPicker", PropertyDisplayName: "Change Request", PropertyName: "Target_d9dfd53c_4c08_408f_9b7d_8dd7513817e3", ClassId: "E6C9CF6E-D7FE-1B5D-216C-C3F5D2C7670C", Disabled: false }
"E6C9CF6E-D7FE-1B5D-216C-C3F5D2C7670C" --> is the class id System.WorkItem.ChangeRequest
For some reason the objectpicker does not load Change request work item