Update Configuration Item from Task
Having issues talking to Cireson api from my custom task, to update a custom configuration item. The javascript seems to be the main issue which I included below I am guessing it has something to do with the api I chose to try do this, but that is only a guess developer tools didn't give much besides a internal 500 server error.
Some Background info/code to what i am doing:
I created a custom class management pack to create a configuration item to hold time entry, our corp needed a start, end date, time and notes for each entry. After the class was created a tab area inside of our ServiceRequest.js was created to display this item like so:
I was able to make a fake test entry with powershell by doing:$class = Get-SCSMClass -id "db967d67-3f45-c6bf-a5d5-8e1fb78945a7" $Properties = @{ TimeRecordID = "{0}" WorkItemID = "SR88297" UserID = "b98f6dac-7d95-1cee-10aa-2d34f5ff2008" StartTime = "2017-01-20T07:00:00.000Z" EndTime = "2017-01-20T09:00:00.000Z" TimeInMinutes = "120" ObjectStatus = 'Active' AssetStatus = "6842782d-3707-20a5-659c-b5d4091e2c49" Notes = "Test dat entry" DisplayName = "Clouthier, Davin (CP - Information Technology)" } New-SCSMObject -Class $class -Property $Properties
This works from powershell but when trying to do the same entry adding from javascript, the entry fails (from the tasks on the right) here is my javascript that I was using to do this (attached)<div> <b>Sorry for the long drawn out post, I was unsure how to clearly convey my issue without providing a bunch of code. </b><br></div>
{ name: "Action Log", type: "multipleObjectPicker", PropertyName: "RelatesToConfigItem", ClassId: "db967d67-3f45-c6bf-a5d5-8e1fb78945a7", PropertyToDisplay: { DisplayName: "DisplayName", Notes: "Notes", StartTime: "StartTime", EndTime: "EndTime", TimeInMinutes: "TimeInMinutes" }, SelectableRow: false, SelectProperty: "DisplayName", Disabled: true },
Comments