Get Work Orders Information
| Name | Type | Length | Description | 
|---|---|---|---|
| None | No input parameters to pass | 
GET http://localhost/FusionServices/v3/Naviline/WorkOrders/TaskInfo
| Name | Description | 
|---|---|
| CATEGORY | Request Category | 
| CATGDESC | Category Description | 
| ASSIGNDEPT | Assigned Department | 
| DFTPROJECT | Default Project Number G/L | 
| USRCDEDSC1 | User defined code description 1 | 
| USRCDEDSC2 | User defined code description 2 | 
| USRNUMDSC | User defined numeric description | 
| REQLOC | Require location ID, N=No, Y=Yes | 
| REQFAC | Require facility ID, B=Both w/r and j/o, N=No, Y=Yes (W/R) | 
| REQCUST | Require customer ID, N=No, Y=Yes | 
| REQPROJ | Require project, N=No, Y=Yes | 
| REQCHGDEPT | Require charge to department, N=No, Y=Yes | 
| REQREQDEPT | Require requesting department, N=No, Y=Yes | 
| REQREFNBR | Require reference number, N=No, Y=Yes | 
| REQUSRCDE1 | Require user defined code 1, N=No, Y=Yes | 
| REQUSRCDE2 | Require user defined code 2, N=No, Y=Yes | 
| REQUSRNUM | Require user defined numeric, N=No, Y=Yes | 
| CATGUOP | Category UOP code | 
| REQGENLOC | Require general location, N=No, Y=Yes | 
| REQFRMNODE | Require from node, N=No, Y=Yes | 
| REQTONODE | Require to node, N=No, Y=Yes | 
| WRKREQGRP | Default work request group, CP=Capital, UC=Utility capital,UT=Utility non-capital, WF=Non-capital | 
| REQPLANNER | Require planner, N=No, Y=Yes | 
| REQDIST | Require district, N=No, Y=Yes | 
| REQTIMES | Require actual start/stop times, N=No, Y=Yes | 
| REQACTTAKN | Require action taken, N=No, Y=Yes | 
| CATGSTATUS | Category status, A=Active, I=Inactive | 
| REQCONTACT | Require contact ID, N=No, Y=Yes | 
| DEPTDESC | Assigned department description | 
| REVCRDACCT | Revenue credit account for interdepartmental billing | 
| EXPDBTACCT | Expense debit account for interdepartmental billing | 
| OVRHDACCT | Overhead account mask | 
| EQUIPACCT | Equipment account mask | 
| OTHERACCT | Other charges account | 
| LABORACCT | Labor charge account | 
| WIPACCT | WIP contra account | 
| DFTPRACCT | Default payroll account | 
| DFTPIACCT | Default PI account (issues) | 
| DFTPOACCT | Default PO account | 
| DFTPCACCT | Default PC account (future use) | 
| DEPTSTATUS | Department status, A=Active, I=Inactive | 
| TASK | Task | 
| TASKDESC | Task Description | 
| CREW | Crew | 
| CREWTYPE | Crew Type | 
| TASKUOP | Task UOP code | 
| SCHPRTY | Scheduling priority (numeric value) | 
| TASKSTATUS | Task Status, A=Active, I=Inactive | 
| O_ERRC | Error Code | 
| O_ERRD | Error Description | 
using System.Net;
using Newtonsoft.Json.Linq;
public void MethodName(parms)
{
    string uri = "http://localhost/FusionServices/v3/Naviline/WorkOrders/TaskInfo";
    WebClient wc = new WebClient();
    wc.Headers.Set("X-APPID", "YOURID");
    wc.Headers.Set("X-APPKEY", "YOURKEY");
    string stringResult = wc.DownloadString(new Uri(uri));
    
    JObject response = JObject.Parse(stringResult);
    string error = response["OutputParms"]["ErrorCode"].ToString();
    if (error == "0000")
    {
        JArray jRows = (JArray)response["Rows"];
        foreach (JObject row in jRows)
        {
             string CATEGORY = row["CATEGORY"].ToString();
             string CATGDESC = row["CATGDESC"].ToString();
             string ASSIGNDEPT = row["ASSIGNDEPT"].ToString();
             string DFTPROJECT = row["DFTPROJECT"].ToString();
             string USRCDEDSC1 = row["USRCDEDSC1"].ToString();
             string USRCDEDSC2 = row["USRCDEDSC2"].ToString();
             string USRNUMDSC = row["USRNUMDSC"].ToString();
             string REQLOC = row["REQLOC"].ToString();
             string REQFAC = row["REQFAC"].ToString();
             string REQCUST = row["REQCUST"].ToString();
             string REQPROJ = row["REQPROJ"].ToString();
             string REQCHGDEPT = row["REQCHGDEPT"].ToString();
             string REQREQDEPT = row["REQREQDEPT"].ToString();
             string REQREFNBR = row["REQREFNBR"].ToString();
             string REQUSRCDE1 = row["REQUSRCDE1"].ToString();
             string REQUSRCDE2 = row["REQUSRCDE2"].ToString();
             string REQUSRNUM = row["REQUSRNUM"].ToString();
             string CATGUOP = row["CATGUOP"].ToString();
             string REQGENLOC = row["REQGENLOC"].ToString();
             string REQFRMNODE = row["REQFRMNODE"].ToString();
             string REQTONODE = row["REQTONODE"].ToString();
             string WRKREQGRP = row["WRKREQGRP"].ToString();
             string REQPLANNER = row["REQPLANNER"].ToString();
             string REQDIST = row["REQDIST"].ToString();
             string REQTIMES = row["REQTIMES"].ToString();
             string REQACTTAKN = row["REQACTTAKN"].ToString();
             string CATGSTATUS = row["CATGSTATUS"].ToString();
             string REQCONTACT = row["REQCONTACT"].ToString();
             string DEPTDESC = row["DEPTDESC"].ToString();
             string REVCRDACCT = row["REVCRDACCT"].ToString();
             string EXPDBTACCT = row["EXPDBTACCT"].ToString();
             string OVRHDACCT = row["OVRHDACCT"].ToString();
             string EQUIPACCT = row["EQUIPACCT"].ToString();
             string OTHERACCT = row["OTHERACCT"].ToString();
             string LABORACCT = row["LABORACCT"].ToString();
             string WIPACCT = row["WIPACCT"].ToString();
             string DFTPRACCT = row["DFTPRACCT"].ToString();
             string DFTPIACCT = row["DFTPIACCT"].ToString();
             string DFTPOACCT = row["DFTPOACCT"].ToString();
             string DFTPCACCT = row["DFTPCACCT"].ToString();
             string DEPTSTATUS = row["DEPTSTATUS"].ToString();
             string TASK = row["TASK"].ToString();
             string TASKDESC = row["TASKDESC"].ToString();
             string CREW = row["CREW"].ToString();
             string CREWTYPE = row["CREWTYPE"].ToString();
             string TASKUOP = row["TASKUOP"].ToString();
             string SCHPRTY = row["SCHPRTY"].ToString();
             string TASKSTATUS = row["TASKSTATUS"].ToString();
             // TODO - YOUR CODE HERE
        }
    }
}
$.get('http://localhost/FusionServices/v3/Naviline/WorkOrders/TaskInfo', function(response) {
    $('#resultDiv).html(response); 
 });
using System;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Collections.Specialized;
using FusionServiceHelper.Models;
// NOTE: Use the namespace generated when you add the class, so that it is correct.
namespace FusionRazor.Models
{
   public class GetTaskInfo
   {
       // Add property for each input param in order to map a field to it
       public GetTaskInfo()
       {
           //Set any defaults here
       }
   }
}
@* NOTE: Use Add->View to add the View. *@
@* NOTE: Check the 'Create strongly-typed view checkbox, and select the GetTaskInfo class. *@
@* NOTE: Select Edit as the Scaffold template. *@
@* NOTE: Use the @model line that is generated at the top.  Replace the rest with the lines below.
@model FusionRazor.Models.GetTaskInfo
@{
   ViewBag.Title = "GetTaskInfo";
   string myUrl = "http://localhost/FusionServices/v3/Naviline/WorkOrders/TaskInfo";
}
<h2>GetTaskInfo</h2>
@using (Html.BeginForm()) {
   @Html.AntiForgeryToken()
   @Html.ValidationSummary(true)
   <fieldset>
   <legend>GetTaskInfo</legend>
       <div class="editor-label">Use the fields below to change the values and resubmit.</div>
       <p>
       <input type="submit" value="Submit"/>
       </p>
   </fieldset>
}
@section Scripts {
   @Scripts.Render("~/bundles/jqueryval")
}
using System;
using System.Collections.Specialized;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using FusionServiceHelper.Models;
// NOTE: Replace 'MyController' with the name of your controller.
// 
// GET: /MyController/GetTaskInfo
public ActionResult GetTaskInfo()
{
   // Create a new instance of the model to pick up any default values.
   GetTaskInfo model =  new GetTaskInfo();
   // pass model to set to default values
   // NOTE: Change 'MyFolderPath' to the path to the .cshtml file.
   return View("~/Views/MyFolderPath/GetTaskInfo.cshtml", model);
}
// 
// POST: /MyController/GetTaskInfo
[HttpPost]
public ActionResult GetTaskInfo(FormCollection collection)
{
   string url = "v3/Naviline/WorkOrders/TaskInfo";
   // Get the value from each input field
   NameValueCollection inputParms = new NameValueCollection();
   try
   {
       // Send the request
       FusionServiceRequest request = new FusionServiceRequest();
       FusionServiceResult result = request.Get(url, inputParms);
       return View("Result", result);
   }
   catch(Exception e)
   {
       HandleErrorInfo info = new HandleErrorInfo(e, "MyController", "GetTaskInfo");
       return View("Error", info);
   }
}