Method PostRetrieveItemIssuesInformation

Summary

Retrieve Item Issue Information - Coming soon... targeted release 21.2

Remarks

Retrieve Item Issue Information

Input Parameters

NameTypeLengthDescription
workOrderNumber System.String 9 [Required] Work Order Number tosearch for.
workOrderJobNumber System.String 3 [Required] Work Order Job Number to search for (leave blank for all).

Example

POST http://localhost/FusionServices/v3/Naviline/ProductInventory/RetrieveItemIssuesInformation

Return Values

NameDescription
Building Building Code
Commodity Commodity
SubComm Sub Commodity
Item Item
Unused Unused
TransCode Transaction Code
TransDateCentury Transaction Date Century
TransDateYear Transaction Date Year
TransDateMonth Transactoin Date Month
TransDateDay Transaction Date Day
TransTime Transaction Time
QuantityIssued Quantity Issued
QuantityReturned Quantity Returned
IssuedUnitCost Issued Unit Cost
IssuedExpAcctNo Issued Expenditure Account Number
IssuedProjNo Issued Project Number
EquipNo Equipment Number
RepairControlNo Repair Control Number
JobOrderNo Job Order Number
ManJobOrderNo Man Job Order Number
TransNumber Transaction Number
TransactedBy Transacted By
IssuedTo Issued To
IssueCSTChange Issue CST Change
IssueAssetAcctNo Issue Asset Account Number
Dpt Dpt
Sub Sub
PercentMarkup Percent Markup
ChgBckRatCode Charge Back Rate Code
FuelTypeCode Fuel Type Code
FuelCardNo Fuel Card Number
PRIAuxCode PRI Aux Code
MeterReading Meter Reading
CardRdrNo Card Reader Number
PumpNo Pump Number
MachClassCode Mach Class Code
RdUseCode Rd Use Code
LocationCode1 Location Code 1
LocationCode2 Location Code 2
LocationCode3 Location Code 3
LocationCode4 Location Code 4
LocationCode5 Location Code 5
UserID UserID
PostDateCentury Post Date Century
PostDateYear Post Date Year
PostDateMonth Post Date Month
PostDateDay Post Date Day
PostTime Post Time
PercentSalesTax Percent Sales Tax
IssuesSalesTaxLiaAcctNo Issues Sales Tax Lia Acctount Number
BillingEquipNo Billing Equipment Numnber
EmployeeFuelCardNo Employee Fuel Card Number
FleetMaintDelCode Fleet Maintenance Del Code
WorkOrderID Work Order ID
WorkOrderJobNo Work Order Job Number
WOApplDesignATO Work Order Application Design ATO
OneTimeItemNo One Time Item Number
WorkOrderFacCode Work Order Fac Code
AJSentToGM AJ Sent To GM
PONoForIR PO Number For IR
LineNo Line Number
OneTimeItemDesc One Time Item Description
TransFiscalYear Transaction Fiscal Year
TransPostedYear Transaction Posted Year
RequisitionNo Requisition Number
OrigTrx Orig Trx
ErrorCode 0000=Success
ErrorDescription Error message describing any error that occurred

Sample Responses

Sample Code

using System.Net;
using Newtonsoft.Json.Linq;

public void MethodName(parms)
{
   string uri = "http://localhost/FusionServices/v3/Naviline/ProductInventory/RetrieveItemIssuesInformation";
   System.Collections.Specialized.NameValueCollection postParms = 
     new System.Collections.Specialized.NameValueCollection(); 
   // Set paramater values
   postParms.Add("workOrderNumber",System.Web.HttpUtility.UrlEncode("WF0152435"));
   postParms.Add("workOrderJobNumber",System.Web.HttpUtility.UrlEncode("001"));

   WebClient req = new WebClient();
   wc.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
   wc.Headers.Set("X-APPID", "YOURID");
   wc.Headers.Set("X-APPKEY", "YOURKEY");

   byte[] responseBytes = wc.UploadValues(new Uri(uri), "POST", postParms);
   string stringResult = Encoding.UTF8.GetString(responseBytes); 
   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 Building = row["Building"].ToString();
             string Commodity= = row["Commodity="].ToString();
             string SubComm = row["SubComm"].ToString();
             string Item = row["Item"].ToString();
             string Unused = row["Unused"].ToString();
             string TransCode = row["TransCode"].ToString();
             string TransDateCentury = row["TransDateCentury"].ToString();
             string TransDateYear = row["TransDateYear"].ToString();
             string TransDateMonth = row["TransDateMonth"].ToString();
             string TransDateDay = row["TransDateDay"].ToString();
             string TransTime = row["TransTime"].ToString();
             string QuantityIssued = row["QuantityIssued"].ToString();
             string QuantityReturned = row["QuantityReturned"].ToString();
             string IssuedUnitCost = row["IssuedUnitCost"].ToString();
             string IssuedExpAcctNo = row["IssuedExpAcctNo"].ToString();
             string IssuedProjNo = row["IssuedProjNo"].ToString();
             string EquipNo = row["EquipNo"].ToString();
             string RepairControlNo = row["RepairControlNo"].ToString();
             string JobOrderNo = row["JobOrderNo"].ToString();
             string ManJobOrderNo = row["ManJobOrderNo"].ToString();
             string TransNumber = row["TransNumber"].ToString();
             string TransactedBy = row["TransactedBy"].ToString();
             string IssuedTo = row["IssuedTo"].ToString();
             string IssueCSTChange = row["IssueCSTChange"].ToString();
             string IssueAssetAcctNo = row["IssueAssetAcctNo"].ToString();
             string Dpt = row["Dpt"].ToString();
             string Sub = row["Sub"].ToString();
             string PercentMarkup = row["PercentMarkup"].ToString();
             string ChgBckRatCode = row["ChgBckRatCode"].ToString();
             string FuelTypeCode = row["FuelTypeCode"].ToString();
             string FuelCardNo = row["FuelCardNo"].ToString();
             string PRIAuxCode = row["PRIAuxCode"].ToString();
             string MeterReading = row["MeterReading"].ToString();
             string CardRdrNo = row["CardRdrNo"].ToString();
             string PumpNo = row["PumpNo"].ToString();
             string MachClassCode = row["MachClassCode"].ToString();
             string RdUseCode = row["RdUseCode"].ToString();
             string LocationCode1 = row["LocationCode1"].ToString();
             string LocationCode2 = row["LocationCode2"].ToString();
             string LocationCode3 = row["LocationCode3"].ToString();
             string LocationCode4 = row["LocationCode4"].ToString();
             string LocationCode5 = row["LocationCode5"].ToString();
             string UserID = row["UserID"].ToString();
             string PostDateCentury = row["PostDateCentury"].ToString();
             string PostDateYear = row["PostDateYear"].ToString();
             string PostDateMonth = row["PostDateMonth"].ToString();
             string PostDateDay = row["PostDateDay"].ToString();
             string PostTime = row["PostTime"].ToString();
             string PercentSalesTax = row["PercentSalesTax"].ToString();
             string IssuesSalesTaxLiaAcctNo = row["IssuesSalesTaxLiaAcctNo"].ToString();
             string BillingEquipNo = row["BillingEquipNo"].ToString();
             string EmployeeFuelCardNo = row["EmployeeFuelCardNo"].ToString();
             string FleetMaintDelCode = row["FleetMaintDelCode"].ToString();
             string WorkOrderID = row["WorkOrderID"].ToString();
             string WorkOrderJobNo = row["WorkOrderJobNo"].ToString();
             string WOApplDesignATO = row["WOApplDesignATO"].ToString();
             string OneTimeItemNo = row["OneTimeItemNo"].ToString();
             string WorkOrderFacCode = row["WorkOrderFacCode"].ToString();
             string AJSentToGM = row["AJSentToGM"].ToString();
             string PONoForIR = row["PONoForIR"].ToString();
             string LineNo = row["LineNo"].ToString();
             string OneTimeItemDesc = row["OneTimeItemDesc"].ToString();
             string TransFiscalYear = row["TransFiscalYear"].ToString();
             string TransPostedYear = row["TransPostedYear"].ToString();
             string RequisitionNo = row["RequisitionNo"].ToString();
             string OrigTrx = row["OrigTrx"].ToString();
             // TODO - YOUR CODE HERE
        }
   }
}

C# Razor MVC Sample Code

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 PostRetrieveItemIssuesInformation
   {
       // Add property for each input param in order to map a field to it
       [Required(ErrorMessage = "Required")]
       [RegularExpression("^(?=.{0,9}$).*", ErrorMessage = "Must be 9 characters or less. ")]
       public string workOrderNumber{get; set;}

       [Required(ErrorMessage = "Required")]
       [RegularExpression("^(?=.{0,3}$).*", ErrorMessage = "Must be 3 characters or less. ")]
       public string workOrderJobNumber{get; set;}

       public PostRetrieveItemIssuesInformation()
       {
           //Set any defaults here
       }
   }
}
@* NOTE: Use Add->View to add the View. *@
@* NOTE: Check the 'Create strongly-typed view checkbox, and select the PostRetrieveItemIssuesInformation 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.PostRetrieveItemIssuesInformation

@{
   ViewBag.Title = "PostRetrieveItemIssuesInformation";
}

<h2>PostRetrieveItemIssuesInformation</h2>
@using (Html.BeginForm()) {
   @Html.AntiForgeryToken()
   @Html.ValidationSummary(true)
   <fieldset>
   <legend>PostRetrieveItemIssuesInformation</legend>
       <div class="editor-label">
           @Html.LabelFor(model => model.workOrderNumber)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.workOrderNumber)
           @Html.ValidationMessageFor(model => model.workOrderNumber)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.workOrderJobNumber)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.workOrderJobNumber)
           @Html.ValidationMessageFor(model => model.workOrderJobNumber)
       </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/PostRetrieveItemIssuesInformation
public ActionResult PostRetrieveItemIssuesInformation()
{
   // Create a new instance of the model to pick up any default values.
   PostRetrieveItemIssuesInformation model =  new PostRetrieveItemIssuesInformation();

   // pass model to set to default values
   // NOTE: Change 'MyFolderPath' to the path to the .cshtml file.
   return View("~/Views/MyFolderPath/PostRetrieveItemIssuesInformation.cshtml", model);
}

// 
// POST: /MyController/PostRetrieveItemIssuesInformation
[HttpPost]
public ActionResult PostRetrieveItemIssuesInformation(FormCollection collection)
{
   string url = "v3/Naviline/ProductInventory/RetrieveItemIssuesInformation";
   // Get the value from each input field
   NameValueCollection inputParms = new NameValueCollection();
   inputParms.Add("workOrderNumber", collection["workOrderNumber"]);
   inputParms.Add("workOrderJobNumber", collection["workOrderJobNumber"]);

   try
   {
       // Send the request
       FusionServiceRequest request = new FusionServiceRequest();
       FusionServiceResult result = request.Post(url, inputParms);

       return View("Result", result);
   }
   catch(Exception e)
   {
       HandleErrorInfo info = new HandleErrorInfo(e, "MyController", "PostRetrieveItemIssuesInformation");
       return View("Error", info);
   }
}