2 Replies Latest reply on Mar 14, 2019 1:39 PM by Jas Bhinder

    Track-it! Web api create work order and add Note at same time!

    Jas Bhinder
      Share This:

      hello all,

       

      any advice or redirection will be much appreciable.

       

      I am trying to open a work order and same time i need to add a note in it, with one api call.

       

      I am working in C#

      Track-IT 11.4

       

      My code open's the work order but no adding a note it in!!!!

       

      var_StartDate = DateTime.ParseExact(txtStartDate.Text + " 7:00:00 PM", "M/d/yyyy h:mm:ss tt", CultureInfo.InvariantCulture).ToString();

      var CreateWorkOrder1 = new Dictionary<string, string>()

                      {

                          {"StatusName","Open" },

                          {"Summary","Test"} ,

                          {"AssignedTechnician", "*Group Ticket"},

                          {"Type","test"},

                          {"SubType","Network"},

                          {"Category","Desktop"},

                          {"ParentIncidentId",0},

                          {"Priority","Normal - Single User Issue – Workaround Available" },

                          {"RequestorName","abc"},

                          //not working {"EnteredCompletionDate",var_StartDate},

                      

      // not working  {"Notes","FullText\":\"This is a test Note\""},

      // not working {"Notes","{[\"IsPrivate\":\"False\",\"FullText\":\"This is a test Note\"]}"},

      // not working {"Notes","{\"IsPrivate\":\"False\",\"FullText\":\"This is a test Note\"}"},

                      };

      HttpResponseMessage response3 = client.PostAsJsonAsync("api/workorder/Create", CreateWorkOrder1).Result;