Help with Action Log Comment Type
Hi All,
I am creating an interface via the API with our IVR phone system, so that our tech can update IR and SR work items. With the help of the forums I got the part of the json I needed to update to add comments to the ticket, however I can only seem to add a end user comment.
Update for Incident Requests
{
"ActionType": {
"Id": "f14b70f4-878c-c0e1-b5c1-06ca22d05d40",
"Name": "Analyst Comment"
},
"Description": "Comment tst 4, new comment",
"EnteredBy": "Shane Weber",
"EnteredDate": "2019-06-10T19:18:32.2336149",
"LastModified": "2019-06-10T19:18:32.2336149",
"Title": "Analyst Comment",
"Image": "/Content/Images/Icons/ActionLogIcons/recordassigned.png",
"IsPrivate": null,
"LastUpdatedDisplay": null,
"isDirty": true
}
Json for Service Requests
{
"ActionType": {
"Id": "79d27435-5917-b0a1-7911-fb2b678f32a6",
"Name": "Analyst Comment"
},
"Description": "Comment test 1, new comment",
"EnteredBy": "Shane Weber",
"EnteredDate": "2019-06-10T19:18:32.2336149",
"LastModified": "2019-06-10T19:18:32.2336149",
"Title": "Analyst Comment",
"Image": "/Content/Images/Icons/ActionLogIcons/recordassigned.png",
"IsPrivate": null,
"LastUpdatedDisplay": null,
"isDirty": true
},
On each update I also have the relatestotroubleticket or appliestoworkitem section in the name relationship array. I believe that I need to update the relationshipid in the name relationship array and in the Action Type, but when I change that to anything else I cannot get the updates to post.
Best Answer
-
Nicholas_Velich Cireson Consultant Ninja IT Monkey ✭✭✭✭For ActionType -> Name, try "AnalystComment" without the space.
You could also put ActionType directly as a property at the root. For example:this.projection.AppliesToWorkItem.push({EnteredBy: window['session'].user.Name,Title: "Analyst Comment",IsPrivate: true,EnteredDate: new Date().toISOString(),LastModified: new Date().toISOString(),Description: this.crForm.value.actionlogNotes,ActionType: "AnalystComment"});5
Answers
You could also put ActionType directly as a property at the root. For example: