Friday, 16 December 2016

Field Service - Purchase Order - Deep Dive

The 'Purchase Order' entity is msdyn_purchaseorder.



The fields are: -

Purchase Order Id (Unique Identifier)  msdyn_purchaseorderId
Name (string) msdyn_name
Sub-Status (lookup) msdyn_substatus
Approval Status (picklist) msdyn_approvalstatus
Purchase Order Date (DateTime) msdyn_purchaseorderdate
Vendor (lookup) msdyn_vendor
Vendor Note (memo) msdyn_vendornote
Date Expected (DateTime)  msdyn_dateexpected
Ship To (picklist) msdyn_shipto
Payment Term (lookup) msdyn_paymentterm
Ship Via (lookup) msdyn_shipvia
Receive to Warehouse (lookup) msdyn_receivetowarehouse
Work Order (lookup) msdyn_workorder
Booking (lookup) msdyn_booking
Total Amount (money) msdyn_totalamount
Amount Billed (money)  msdyn_amountbilled
Requested By Resource (lookup)  msdyn_requestedbyresource
Approved/Rejected By  (lookup)  msdyn_approvedrejectedby
Ordered By (lookup)   msdyn_orderedby
Address Name (string) msdyn_addressname
Address1 (string) msdyn_address1
Address2 (string) msdyn_address2
Address3 (string) msdyn_address3
Postal Code (string) msdyn_postalcode
City (string) msdyn_city
State (string)msdyn_stateorprovince
Country/Region(string)msdyn_country
Latitude (double) msdyn_latitude
Longitude (double)msdyn_longitude


 ------------------------------------------------------------------------------------
Late-binding example
-----------------------------------------------------------------------------------

var msdyn_address1 = result["msdyn_address1"];
var msdyn_address2 = result["msdyn_address2"];
var msdyn_address3 = result["msdyn_address3"];
var msdyn_addressname = result["msdyn_addressname"];
var msdyn_amountbilled = result["msdyn_amountbilled"];
var msdyn_amountbilled_formatted = result["msdyn_amountbilled@OData.Community.Display.V1.FormattedValue"];
           
var msdyn_amountbilled_base = result["msdyn_amountbilled_base"];
var msdyn_amountbilled_base_formatted = result["msdyn_amountbilled_base@OData.Community.Display.V1.FormattedValue"];
           
var msdyn_approvalstatus = result["msdyn_approvalstatus"];
var msdyn_approvalstatus_formatted = result["msdyn_approvalstatus@OData.Community.Display.V1.FormattedValue"];
           
var _msdyn_approvedrejectedby_value = result["_msdyn_approvedrejectedby_value"];
var _msdyn_approvedrejectedby_value_formatted = result["_msdyn_approvedrejectedby_value@OData.Community.Display.V1.FormattedValue"];          
var _msdyn_approvedrejectedby_value_lookuplogicalname = result["_msdyn_approvedrejectedby_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
           
var _msdyn_booking_value = result["_msdyn_booking_value"];
var _msdyn_booking_value_formatted = result["_msdyn_booking_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_booking_value_lookuplogicalname = result["_msdyn_booking_value@Microsoft.Dynamics.CRM.lookuplogicalname"];

var msdyn_city = result["msdyn_city"];
var msdyn_country = result["msdyn_country"];
var msdyn_dateexpected = result["msdyn_dateexpected"];
var msdyn_latitude = result["msdyn_latitude"];
 var msdyn_latitude_formatted = result["msdyn_latitude@OData.Community.Display.V1.FormattedValue"];
           
var msdyn_longitude = result["msdyn_longitude"];
var msdyn_longitude_formatted = result["msdyn_longitude@OData.Community.Display.V1.FormattedValue"];
           
var msdyn_name = result["msdyn_name"];
var _msdyn_orderedby_value = result["_msdyn_orderedby_value"];
var _msdyn_orderedby_value_formatted = result["_msdyn_orderedby_value@OData.Community.Display.V1.FormattedValue"];
           
var _msdyn_orderedby_value_lookuplogicalname = result["_msdyn_orderedby_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
           
var _msdyn_paymentterm_value = result["_msdyn_paymentterm_value"];
var _msdyn_paymentterm_value_formatted = result["_msdyn_paymentterm_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_paymentterm_value_lookuplogicalname = result["_msdyn_paymentterm_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
           
var msdyn_purchaseorderdate = result["msdyn_purchaseorderdate"];
var msdyn_postalcode = result["msdyn_postalcode"];
var msdyn_purchaseorderid = result["msdyn_purchaseorderid"];
var _msdyn_receivetowarehouse_value = result["_msdyn_receivetowarehouse_value"];
var _msdyn_receivetowarehouse_value_formatted = result["_msdyn_receivetowarehouse_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_receivetowarehouse_value_lookuplogicalname = result["_msdyn_receivetowarehouse_value@Microsoft.Dynamics.CRM.lookuplogicalname"];

var _msdyn_requestedbyresource_value = result["_msdyn_requestedbyresource_value"];
var _msdyn_requestedbyresource_value_formatted = result["_msdyn_requestedbyresource_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_requestedbyresource_value_lookuplogicalname = result["_msdyn_requestedbyresource_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
           
var msdyn_shipto = result["msdyn_shipto"];
var msdyn_shipto_formatted = result["msdyn_shipto@OData.Community.Display.V1.FormattedValue"];
           
var _msdyn_shipvia_value = result["_msdyn_shipvia_value"];
var _msdyn_shipvia_value_formatted = result["_msdyn_shipvia_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_shipvia_value_lookuplogicalname = result["_msdyn_shipvia_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
           
var msdyn_stateorprovince = result["msdyn_stateorprovince"];
var _msdyn_substatus_value = result["_msdyn_substatus_value"];
var _msdyn_substatus_value_formatted = result["_msdyn_substatus_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_substatus_value_lookuplogicalname = result["_msdyn_substatus_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
           
var msdyn_systemstatus = result["msdyn_systemstatus"];
var msdyn_systemstatus_formatted = result["msdyn_systemstatus@OData.Community.Display.V1.FormattedValue"];
           
var msdyn_totalamount = result["msdyn_totalamount"];
var msdyn_totalamount_formatted = result["msdyn_totalamount@OData.Community.Display.V1.FormattedValue"];
var msdyn_totalamount_base = result["msdyn_totalamount_base"];
var msdyn_totalamount_base_formatted = result["msdyn_totalamount_base@OData.Community.Display.V1.FormattedValue"];
           
var _msdyn_vendor_value = result["_msdyn_vendor_value"];
var _msdyn_vendor_value_formatted = result["_msdyn_vendor_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_vendor_value_lookuplogicalname = result["_msdyn_vendor_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
           
var msdyn_vendornote = result["msdyn_vendornote"];
var _msdyn_workorder_value = result["_msdyn_workorder_value"];
var _msdyn_workorder_value_formatted = result["_msdyn_workorder_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_workorder_value_lookuplogicalname = result["_msdyn_workorder_value@Microsoft.Dynamics.CRM.lookuplogicalname"];

-----------------------------------------------------------------------------------
Early-binding example
-----------------------------------------------------------------------------------

var msdyn_Address1 = result.msdyn_Address1;
var msdyn_Address2 = result.msdyn_Address2;
var msdyn_Address3 = result.msdyn_Address3;
var msdyn_AddressName = result.msdyn_AddressName;
var msdyn_AmountBilled = result.msdyn_AmountBilled;
var msdyn_amountbilled_Base = result.msdyn_amountbilled_Base;
var msdyn_ApprovalStatus = result.msdyn_ApprovalStatus;
var msdyn_ApprovedRejectedBy = result.msdyn_ApprovedRejectedBy;
var msdyn_Booking = result.msdyn_Booking;
var msdyn_City = result.msdyn_City;
var msdyn_Country = result.msdyn_Country;
var msdyn_DateExpected = result.msdyn_DateExpected;
var msdyn_Latitude = result.msdyn_Latitude;
var msdyn_Longitude = result.msdyn_Longitude;
var msdyn_name = result.msdyn_name;
var msdyn_OrderedBy = result.msdyn_OrderedBy;
var msdyn_PaymentTerm = result.msdyn_PaymentTerm;
var msdyn_PODate = result.msdyn_PODate;
var msdyn_PostalCode = result.msdyn_PostalCode;
var msdyn_purchaseorderId = result.msdyn_purchaseorderId;
var msdyn_ReceivetoWarehouse = result.msdyn_ReceivetoWarehouse;
var msdyn_RequestedByResource = result.msdyn_RequestedByResource;
var msdyn_ShipTo = result.msdyn_ShipTo;
var msdyn_ShipVia = result.msdyn_ShipVia;
var msdyn_StateOrProvince = result.msdyn_StateOrProvince;
var msdyn_SubStatus = result.msdyn_SubStatus;
var msdyn_SystemStatus = result.msdyn_SystemStatus;
var msdyn_TotalAmount = result.msdyn_TotalAmount;
var msdyn_totalamount_Base = result.msdyn_totalamount_Base;
var msdyn_Vendor = result.msdyn_Vendor;
var msdyn_VendorNote = result.msdyn_VendorNote;
var msdyn_WorkOrder = result.msdyn_WorkOrder;


No comments:

Post a Comment