Saturday, 31 December 2016

Side Snippet - Territory and related entities.

Field services uses territories to relate 'Postal Codes' to.

Recall in  Dynamics CRM 'Territories' is a geographical area that is usually assigned to a salesperson.
As per the documentation:

Territories are used to divide large service areas. If a service territory is assigned to a service account record, and a work order is generated for that service account, then the work order will inherit the service territory from the service account.


Recall 'Business Units' are part of the security model.
As per the documentation:

An organization in Microsoft Dynamics 365, such as a holding company or a corporation, is made up of business units. A business unit is a unit of the top-level organization. Business units can be parents of other business units (child business units). The first business unit created for an organization is called the root business unit.


Recall the 'Site' entity represents a location or branch office where an organization does business. As per the documentation:

Sites enable resources, services, and appointments to be defined at a particular location with an associated time zone. Location, correct selection of resources, and time zone are important elements in the scheduling of service appointments when multiple locations of doing business are involved. You can use sites to limit what resources, such as users and equipment, can be scheduled for a specific service activity.


Note: 'Sales Territory' and 'Service Territory' utilise the same underlying enatity 'Territory'.


Friday, 30 December 2016

Field Services - Postal Code - Deep Dive

The 'Postal Code' entity is msdyn_postalcode.
This links a postal code to a service territory.







The fields are: -




Postal Code Id (Unique Identifier) msdyn_postalcodeid
Name (string) msdyn_name
Service Territory (lookup) msdyn_serviceterritory


------------------------------------------------------------------------------------
Late-binding example (using OData)
----------------------------------------------------------------------------------- 


var msdyn_name = result["msdyn_name"];
var msdyn_postalcodeid = result["msdyn_postalcodeid"];
            
var _msdyn_serviceterritory_value = result["_msdyn_serviceterritory_value"];
var _msdyn_serviceterritory_value_formatted = result["_msdyn_serviceterritory_value@OData.Community.Display.V1.FormattedValue"];

var _msdyn_serviceterritory_value_lookuplogicalname = result["_msdyn_serviceterritory_value@Microsoft.Dynamics.CRM.lookuplogicalname"];




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

var msdyn_name = result.msdyn_name;
var msdyn_postalcodeId = result.msdyn_postalcodeId;

var msdyn_ServiceTerritory = result.msdyn_ServiceTerritory;

Field Service - Bookable Resource Booking - Deep Dive

The 'Bookable Resource Booking' entity is bookableresourcebooking

The fields are: -







Estimated Arrival Time (DateTime) msdyn_estimatedarrivaltime Actual Arrival Time (DateTime) msdyn_actualarrivaltime
Total Billable Duration (integer) msdyn_totalbillableduration
Total Duration In Progress (integer) msdyn_totaldurationinprogress
Total Break Duration (integer) msdyn_totalbreakduration

Work Order (lookup) msdyn_workorder
Allow Overlapping (boolean) msdyn_allowoverlapping
Booking Method (picklist) msdyn_bookingmethod
Resource Group (lookup) msdyn_resourcegroup
Total Cost (money) msdyn_totalcost
Agreement Booking Date (lookup) msdyn_agreementbookingdate
Time Group Detail Selected (lookup) msdyn_timegroupdetailselected

Estimated Travel Duration (integer) msdyn_estimatedtravelduration
Actual Travel Duration (integer) msdyn_actualtravelduration
Miles Traveled (double) msdyn_milestraveled

Latitude (double) msdyn_latitude
Longitude (double) msdyn_longitude

Cascade Crew Changes (boolean) msdyn_cascadecrewchanges *
Internal Flags (memo) msdyn_internalflags *
 Prevent Timestamp Creation (boolean) msdyn_preventtimestampcreation *
 Slot Text (memo) msdyn_slottext *
 Travel Time Rescheduling (boolean) msdyn_traveltimerescheduling *


------------------------------------------------------------------------------------
Late-binding example (using OData)
----------------------------------------------------------------------------------- 
 var msdyn_actualarrivaltime = result["msdyn_actualarrivaltime"];
            
var msdyn_actualtravelduration = result["msdyn_actualtravelduration"];
var msdyn_actualtravelduration_formatted = result["msdyn_actualtravelduration@OData.Community.Display.V1.FormattedValue"];
            
var _msdyn_agreementbookingdate_value = result["_msdyn_agreementbookingdate_value"];
var _msdyn_agreementbookingdate_value_formatted = result["_msdyn_agreementbookingdate_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_agreementbookingdate_value_lookuplogicalname = result["_msdyn_agreementbookingdate_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
            
var msdyn_allowoverlapping = result["msdyn_allowoverlapping"];
var msdyn_allowoverlapping_formatted = result["msdyn_allowoverlapping@OData.Community.Display.V1.FormattedValue"];
            
var msdyn_bookingmethod = result["msdyn_bookingmethod"];
var msdyn_bookingmethod_formatted = result["msdyn_bookingmethod@OData.Community.Display.V1.FormattedValue"];
            
var msdyn_cascadecrewchanges = result["msdyn_cascadecrewchanges"];
var msdyn_cascadecrewchanges_formatted = result["msdyn_cascadecrewchanges@OData.Community.Display.V1.FormattedValue"];
            
var msdyn_estimatedarrivaltime = result["msdyn_estimatedarrivaltime"];
            
var msdyn_estimatedtravelduration = result["msdyn_estimatedtravelduration"];
var msdyn_estimatedtravelduration_formatted = result["msdyn_estimatedtravelduration@OData.Community.Display.V1.FormattedValue"];
            
var msdyn_internalflags = result["msdyn_internalflags"]; 

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_milestraveled = result["msdyn_milestraveled"];
var msdyn_milestraveled_formatted = result["msdyn_milestraveled@OData.Community.Display.V1.FormattedValue"];
            
var msdyn_preventtimestampcreation = result["msdyn_preventtimestampcreation"];
var msdyn_preventtimestampcreation_formatted = result["msdyn_preventtimestampcreation@OData.Community.Display.V1.FormattedValue"];
            
var _msdyn_resourcegroup_value = result["_msdyn_resourcegroup_value"];
var _msdyn_resourcegroup_value_formatted = result["_msdyn_resourcegroup_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_resourcegroup_value_lookuplogicalname = result["_msdyn_resourcegroup_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
            
var msdyn_slottext = result["msdyn_slottext"];
            
var _msdyn_timegroupdetailselected_value = result["_msdyn_timegroupdetailselected_value"];
var _msdyn_timegroupdetailselected_value_formatted = result["_msdyn_timegroupdetailselected_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_timegroupdetailselected_value_lookuplogicalname = result["_msdyn_timegroupdetailselected_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
            
var msdyn_totalbillableduration = result["msdyn_totalbillableduration"];
var msdyn_totalbillableduration_formatted = result["msdyn_totalbillableduration@OData.Community.Display.V1.FormattedValue"];
var msdyn_totalbreakduration = result["msdyn_totalbreakduration"];
var msdyn_totalbreakduration_formatted = result["msdyn_totalbreakduration@OData.Community.Display.V1.FormattedValue"];
            
var msdyn_totalcost = result["msdyn_totalcost"];
var msdyn_totalcost_formatted = result["msdyn_totalcost@OData.Community.Display.V1.FormattedValue"];
var msdyn_totalcost_base = result["msdyn_totalcost_base"];
            
var msdyn_totalcost_base_formatted = result["msdyn_totalcost_base@OData.Community.Display.V1.FormattedValue"];
            
var msdyn_totaldurationinprogress = result["msdyn_totaldurationinprogress"];
var msdyn_totaldurationinprogress_formatted = result["msdyn_totaldurationinprogress@OData.Community.Display.V1.FormattedValue"];
            
var msdyn_traveltimerescheduling = result["msdyn_traveltimerescheduling"];
var msdyn_traveltimerescheduling_formatted = result["msdyn_traveltimerescheduling@OData.Community.Display.V1.FormattedValue"];
            
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_ActualArrivalTime = result.msdyn_ActualArrivalTime;
 var msdyn_ActualTravelDuration = result.msdyn_ActualTravelDuration;
 var msdyn_AgreementBookingDate = result.msdyn_AgreementBookingDate;
 var msdyn_AllowOverlapping = result.msdyn_AllowOverlapping;
 var msdyn_BookingMethod = result.msdyn_BookingMethod;
 var msdyn_CascadeCrewChanges = result.msdyn_CascadeCrewChanges;
 var msdyn_EstimatedArrivalTime = result.msdyn_EstimatedArrivalTime;
 var msdyn_EstimatedTravelDuration = result.msdyn_EstimatedTravelDuration;
 var msdyn_InternalFlags = result.msdyn_InternalFlags;
 var msdyn_Latitude = result.msdyn_Latitude;
 var msdyn_Longitude = result.msdyn_Longitude;
 var msdyn_MilesTraveled = result.msdyn_MilesTraveled;
 var msdyn_PreventTimestampCreation = result.msdyn_PreventTimestampCreation;
 var msdyn_ResourceGroup = result.msdyn_ResourceGroup;
 var msdyn_SlotText = result.msdyn_SlotText;
 var msdyn_TimeGroupDetailSelected = result.msdyn_TimeGroupDetailSelected;
var msdyn_TotalBillableDuration = result.msdyn_TotalBillableDuration;
var msdyn_TotalBreakDuration = result.msdyn_TotalBreakDuration;
var msdyn_TotalCost = result.msdyn_TotalCost;
var msdyn_totalcost_Base = result.msdyn_totalcost_Base;
var msdyn_TotalDurationInProgress = result.msdyn_TotalDurationInProgress;
var msdyn_TravelTimeRescheduling = result.msdyn_TravelTimeRescheduling;

var msdyn_WorkOrder = result.msdyn_WorkOrder;


Saturday, 24 December 2016

Field Service -Administration - Deep Dive

The 'Administration' entity for Field Services is msdyn_fieldservicesetting.




The fields are: -



Field Service Setting Id (Unique Identifier) msdyn_fieldservicesettingid
Name (string) msdyn_name

Work Order Prefix (string)  msdyn_workorderprefix
Default Scheduled Booking Status (lookup) msdyn_defaultscheduledbookingstatus
Default Canceled Booking Status (lookup) msdyn_defaultcanceledbookingstatus
Default Work Order Completed Status (picklist) msdyn_defaultworkordercompletedstatus
Default Booking Duration (integer) msdyn_defaultbookingduration

Work Order Starting Number (integer) msdyn_workorderstartingnumber
Work Order Invoice Creation (picklist) msdyn_workorderinvoicecreation
Travel Charge Item (lookup) msdyn_travelchargeitemid
Default Warehouse (lookup) msdyn_defaultwarehouse


Deactivate Work Order When Posted (boolean) msdyn_deactivateworkorderwhenposted
Deactivate Work Order When Canceled (boolean) msdyn_deactivateworkorderwhencanceled
Deactivate Booking When Completed (boolean) msdyn_deactivatebookingwhencompleted
Deactivate Booking When Canceled (boolean) msdyn_deactivatebookingwhencanceled


Work Pay Type (lookup) msdyn_workpaytype
Business Closure Pay Type (lookup) msdyn_businessclosurepaytype
Travel Pay Type (lookup) msdyn_travelpaytype
Overtime Pay Type (lookup) msdyn_overtimepaytype
Break Pay Type Lookup (lookup) msdyn_breakpaytype



Default Radius (boolean)  msdyn_defaultradiusunit
Default Radius Value (integer) msdyn_defaultradiusvalue
Undefined Booking Location (picklist) msdyn_undefinedbookinglocation




Scheduler Field Service Details View (string)  msdyn_schedulerfieldservicedetailsview
Scheduler Field Service Tooltip View (string) msdyn_schedulerfieldservicetooltipview
Scheduler Field Service Slot Text Template (memo)  msdyn_schedulerfieldserviceslottexttemplate
Scheduler Core Slot Text Template (memo)  msdyn_schedulercoreslottexttemplate
Scheduler Core Details View (string) msdyn_schedulercoredetailsview
Scheduler Core Tooltip View (string) msdyn_schedulercoretooltipview



Notification Timeout (In sec) (integer) msdyn_notificationtimeout
Booking Alert Template (memo) msdyn_bookingalerttemplate
Cancel Current Slots When Moving (boolean)   msdyn_cancelcurrentslotswhenmoving


Scheduler Resource Tooltip View (string)  msdyn_schedulerresourcetooltipview
Scheduler Business Unit Tooltip View (string)  msdyn_schedulerbusinessunittooltipview
Unscheduled WO Tooltips View (string) msdyn_unscheduledwotooltipsviewid
Scheduler Resource Details View (string)  msdyn_schedulerresourcedetailsview
Scheduler Business Unit Details View (string) msdyn_schedulerbusinessunitdetailsview
Resources Synchronization Timeout (In sec) (integer) msdyn_resourcessynchronizationtimeout





RMA Prefix (string) msdyn_rmaprefix
RMA Starting Number (integer) msdyn_rmastartingnumber

RTV Prefix (string) msdyn_rtvprefix
RTV Starting Number (integer) msdyn_rtvstartingnumber

Agreement Prefix (string) msdyn_agreementprefix
Auto Generate WO for Agreement (boolean) msdyn_autogeneratewoforagreementbooking
Generate Booking Dates X Months In Advance (integer)  msdyn_generatebookingdatesxmonthsinadvance
Generate Agreement Invoices X Days In Advance (integer) msdyn_generateagreementinvoicesxdaysinadvance
Agreement Starting Number (integer) msdyn_agreementstartingnumber
Generate Agreement WO X Days In Advance (integer) msdyn_generateagreementwoxdaysinadvance
Generate Invoice Dates X Months In Advance (integer) msdyn_generateinvoicedatesxmonthsinadvance

Purchase Order Prefix (string)  msdyn_purchaseorderprefix
Purchase Order Approval Required (boolean) msdyn_purchaseorderapprovalrequired
Purchase Order Starting Number (integer) msdyn_purchaseorderstartingnumber
Use of Products Out of Stock (picklist)  msdyn_useofproductsoutofstock


Inventory Transfer Prefix (string) msdyn_inventorytransferprefix
Inventory Adjustment Prefix (string) msdyn_inventoryadjustmentprefix
Inventory Transfer Starting Number (integer)  msdyn_inventorytransferstartingnumber
Inventory Adjustment Starting Number (integer) msdyn_inventoryadjustmentstartingnumber




Bing API Key (string) msdyn_sdkapimapkey
Entity Number Length (integer) msdyn_entitynumberlength
Auto Allocate Estimated Products (boolean) msdyn_autoallocateestimatedproducts
Auto Geo Code Addresses (boolean) msdyn_autogeocodeaddresses
Product Cost Order (picklist)  msdyn_productcostorder


Custom GPS Data (boolean) msdyn_customgpsdata
Custom GPS Resource field (string) msdyn_customgpsresourcefield
Custom GPS Latitude field (string) msdyn_customgpslatitudefield
GPS Location Expires After X Minutes (integer) msdyn_gpslocationexpiresafterxminutes
Custom GPS Location entity (string) msdyn_customgpslocationentity
Custom GPS Timestamp field (string) msdyn_customgpstimestampfield
Custom GPS Longitude field (string)msdyn_customgpslongitudefield

Advanced Settings (memo) msdyn_advancedsettings

Postpone Number Cleanup Until (DateTime)  msdyn_postponenumbercleanupuntil*
Auto Filter Service Territory (boolean)  msdyn_saautofilterserviceterritory*
Scheduler Unscheduled View (string)  msdyn_schedulerunscheduledview*
Travel Time Rescheduling(boolean)  msdyn_traveltimerescheduling*
Use of Products Out of Stock (picklist) msdyn_useofproductsoutofstock*


Hints: -

Auto Geo Code Addresses - allows choice of automatically geo-coding  fields when entering an address. Main reasons not to auto geo-code is: -
  - for bulk imports already containing geo-codes.
  - allow for client specific logic

Bing API Key - is the Bing map api key. This is meant to be used only within Dynamic CRM. This will be included in the license.



Field Service - Return to Vendors (RTVs) - Deep Dive

The 'Return to Vendors  (RTVs)' entity is msdyn_rtv



The fields are: -




RTV Id (Unique Identifier) msdyn_rtvid
RTV Number Number (string) msdyn_name
Vendor Contact (lookup)  msdyn_vendorcontact
Vendor (lookup)  msdyn_vendor
System Status (picklist)  msdyn_systemstatus
Sub-Status (lookup)  msdyn_substatus
Total Amount (money) msdyn_totalamount

Address 1 (string) msdyn_address1 *
Address 2 (string) msdyn_address2 *
Address 3 (string) msdyn_address3 *
City (string) msdyn_city *
State Or Province (string) msdyn_stateorprovince *
Country/Region (string) msdyn_country *
Postal Code (string) msdyn_postalcode *

Latitude (double) msdyn_latitude *
Longitude (double) msdyn_longitude *

Approved/Declined By (lookup)  msdyn_approveddeclinedby *
Booking (lookup)  msdyn_booking *
Ship Via (lookup)  msdyn_shipvia *
Original Purchase Order (lookup)  msdyn_originalpurchaseorder *
Originating (lookup)  msdyn_originatingrma *
Reference No (string) msdyn_referenceno *
Request Date (DateTimemsdyn_requestdate *
Return Date (DateTimemsdyn_returndate *
Returned By (lookup)  msdyn_returnedby *
Tax Code (lookup)  msdyn_taxcode *
Work Order (lookup)  msdyn_workorder *




------------------------------------------------------------------------------------
Late-binding example (using OData)
----------------------------------------------------------------------------------- 

var msdyn_address1 = result["msdyn_address1"];
var msdyn_address2 = result["msdyn_address2"];
var msdyn_address3 = result["msdyn_address3"];
           
var _msdyn_approveddeclinedby_value = result["_msdyn_approveddeclinedby_value"];
var _msdyn_approveddeclinedby_value_formatted = result["_msdyn_approveddeclinedby_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_approveddeclinedby_value_lookuplogicalname = result["_msdyn_approveddeclinedby_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_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_originalpurchaseorder_value = result["_msdyn_originalpurchaseorder_value"];
var _msdyn_originalpurchaseorder_value_formatted = result["_msdyn_originalpurchaseorder_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_originalpurchaseorder_value_lookuplogicalname = result["_msdyn_originalpurchaseorder_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
            
var _msdyn_originatingrma_value = result["_msdyn_originatingrma_value"];
var _msdyn_originatingrma_value_formatted = result["_msdyn_originatingrma_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_originatingrma_value_lookuplogicalname = result["_msdyn_originatingrma_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
            
var msdyn_postalcode = result["msdyn_postalcode"];
var msdyn_referenceno = result["msdyn_referenceno"];
var msdyn_requestdate = result["msdyn_requestdate"];
var msdyn_returndate = result["msdyn_returndate"];
            
var _msdyn_returnedby_value = result["_msdyn_returnedby_value"];
var _msdyn_returnedby_value_formatted = result["_msdyn_returnedby_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_returnedby_value_lookuplogicalname = result["_msdyn_returnedby_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
            
var msdyn_rtvid = result["msdyn_rtvid"];
           
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_taxcode_value = result["_msdyn_taxcode_value"];
var _msdyn_taxcode_value_formatted = result["_msdyn_taxcode_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_taxcode_value_lookuplogicalname = result["_msdyn_taxcode_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
            
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_vendorcontact_value = result["_msdyn_vendorcontact_value"];
var _msdyn_vendorcontact_value_formatted = result["_msdyn_vendorcontact_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_vendorcontact_value_lookuplogicalname = result["_msdyn_vendorcontact_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
            
var msdyn_vendorrma = result["msdyn_vendorrma"];
            
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_ApprovedDeclinedBy = result.msdyn_ApprovedDeclinedBy;
var msdyn_Booking = result.msdyn_Booking;
var msdyn_City = result.msdyn_City;
var msdyn_Country = result.msdyn_Country;
var msdyn_Latitude = result.msdyn_Latitude;
var msdyn_Longitude = result.msdyn_Longitude;
var msdyn_name = result.msdyn_name;
var msdyn_OriginalPurchaseOrder = result.msdyn_OriginalPurchaseOrder;
var msdyn_OriginatingRMA = result.msdyn_OriginatingRMA;
var msdyn_PostalCode = result.msdyn_PostalCode;
var msdyn_ReferenceNo = result.msdyn_ReferenceNo;
var msdyn_RequestDate = result.msdyn_RequestDate;
var msdyn_ReturnDate = result.msdyn_ReturnDate;
var msdyn_ReturnedBy = result.msdyn_ReturnedBy;
var msdyn_rtvId = result.msdyn_rtvId;
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_TaxCode = result.msdyn_TaxCode;
var msdyn_TotalAmount = result.msdyn_TotalAmount;
var msdyn_totalamount_Base = result.msdyn_totalamount_Base;
var msdyn_Vendor = result.msdyn_Vendor;
var msdyn_VendorContact = result.msdyn_VendorContact;
var msdyn_VendorRMA = result.msdyn_VendorRMA;

var msdyn_WorkOrder = result.msdyn_WorkOrder;