How to update user defined field in worklog via REST API Powershell?

How to update user defined field in worklog via REST API Powershell?

I'm integrating TFS to service desk, taking hours in TFS and creating a worklog in SD. It all work perfectly, but I need a user defined field in the worklog to be updated as well. The display name is 'TFS Task', its UDF_CHAR2 - a simple character field.

My input data looks like the following. This works except for the additional field. Should I be using the display name instead of the internal worklog field name?

{

"operation": {

     "details": {

       "worklogs": {

          "worklog": {

             "technician": "nameOfPerson",

             "description": "Product Backlog Item TFS#xxxx",

             "workHours": "3",

             "workMinutes" : "0",

             "executedTime": "16 Jan 2018, 01:32:08",

             "UDF_CHAR2": "31411"

} }}}

}




                  New to ADSelfService Plus?