Saturday, 26 November 2016

Field Service - Product deep dive - new entity Field Service Product Item


From the menu - a new entity is exposed : Field Service Price List Item





















The schema name and logical name (currently referred to as name) of this entity is : msdyn_fieldservicepricelistitem.

The fields are:-

Name (string) msdyn_name
Duration Round To (integer) msdyn_durationroundingto
Duration Rounding Policy (picklist) msdyn_durationroundingpolicy
Flat Fee (boolean) msdyn_flatfee
Minimum Charge Amount (Money) msdyn_minimumchargeamount
Minimum Charge Duration (integer) msdyn_minimumchargeduration
Price List (Lookup) msdyn_pricelist
Product / Service (Lookup) msdyn_productservicename


Note: Recall the difference between the schema and logical name is casing. The Schema name may have Pascal Casing, while Logical name is lowercase. I have seen all lower case utilised for Schema names as well. I would suggest creating the schema name as all lower case (as I cannot see the benefit). In this way, all code including plugins and javascript (early or late bound) can utilise the lower case.

Note: Duration Round To has values of  1 minute 15 minutes , 30 minutes etc.


-----------------------------------------------------------------------------------------------------
Late Bound use
-----------------------------------------------------------------------------------------------------

var msdyn_durationroundingpolicy = result["msdyn_durationroundingpolicy"];
var msdyn_durationroundingpolicy_formatted = result["msdyn_durationroundingpolicy@OData.Community.Display.V1.FormattedValue"];
           
var msdyn_durationroundto = result["msdyn_durationroundto"];
var msdyn_durationroundto_formatted = result["msdyn_durationroundto@OData.Community.Display.V1.FormattedValue"];
           
var msdyn_fieldservicepricelistitemid = result["msdyn_fieldservicepricelistitemid"];
var msdyn_flatfee = result["msdyn_flatfee"];
var msdyn_flatfee_formatted = result["msdyn_flatfee@OData.Community.Display.V1.FormattedValue"];
           
var msdyn_minimumchargeamount = result["msdyn_minimumchargeamount"];
var msdyn_minimumchargeamount_formatted = result["msdyn_minimumchargeamount@OData.Community.Display.V1.FormattedValue"];
           
var msdyn_minimumchargeamount_base = result["msdyn_minimumchargeamount_base"];
var msdyn_minimumchargeamount_base_formatted = result["msdyn_minimumchargeamount_base@OData.Community.Display.V1.FormattedValue"];
           
var msdyn_minimumchargeduration = result["msdyn_minimumchargeduration"];
var msdyn_minimumchargeduration_formatted = result["msdyn_minimumchargeduration@OData.Community.Display.V1.FormattedValue"];
           
var msdyn_name = result["msdyn_name"];
var _msdyn_pricelist_value = result["_msdyn_pricelist_value"];
var _msdyn_pricelist_value_formatted = result["_msdyn_pricelist_value@OData.Community.Display.V1.FormattedValue"];
           
var _msdyn_pricelist_value_lookuplogicalname = result["_msdyn_pricelist_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
           
var _msdyn_productservice_value = result["_msdyn_productservice_value"];
 var _msdyn_productservice_value_formatted = result["_msdyn_productservice_value@OData.Community.Display.V1.FormattedValue"];
           
var _msdyn_productservice_value_lookuplogicalname = result["_msdyn_productservice_value@Microsoft.Dynamics.CRM.lookuplogicalname"];



---------------------------------------------------------------------------------------------------
Early Bound use
---------------------------------------------------------------------------------------------------

var msdyn_DurationRoundingPolicy = result.msdyn_DurationRoundingPolicy;
var msdyn_DurationRoundTo = result.msdyn_DurationRoundTo;
var msdyn_fieldservicepricelistitemId = result.msdyn_fieldservicepricelistitemId;
var msdyn_FlatFee = result.msdyn_FlatFee;
var msdyn_MinimumChargeAmount = result.msdyn_MinimumChargeAmount;
var msdyn_minimumchargeamount_Base = result.msdyn_minimumchargeamount_Base;
var msdyn_MinimumChargeDuration = result.msdyn_MinimumChargeDuration;
var msdyn_name = result.msdyn_name;
var msdyn_PriceList = result.msdyn_PriceList;
var msdyn_ProductService = result.msdyn_ProductService;

Thursday, 24 November 2016

Field Service - Product Deep dive on Product Entity

The product entity is used by field services. Additional field service attribute has been created on the Product Entity.


Field Service Product Type (option set) msdyn_fieldserviceproducttype
UPC Code (string) msdyn_upccode - use for barcoding
Convert to Customer Asset (boolean) msdyn_converttocustomerasset
Default Vendor (lookup) msdyn_defaultvendor
Purchase Name (string) msdyn_purchasename - name used on purchase order
Taxable (boolean) msdyn_taxable - indicate if item is taxable



Note: the prefix is ms_dyn. Recall that this prefix is used when Microsoft is the publisher of the solution.

Note: UPC Code has 12 numbers usually used in USA. In Australia EAN-13 and UPC format is used. EAN-13 has 13 numbers and is a  European format. EAN is a superset of UPC to allow for extra numbers. Scanners can typically read both formats.

Note: Field Service product type OOB options are: -

Inventory
Non-Inventory -product that is not tracked for inventory purposes.
Service

----------------------------------------------------------------------------------------------------
Late Binding use
----------------------------------------------------------------------------------------------------

var msdyn_converttocustomerasset = result["msdyn_converttocustomerasset"];
var msdyn_converttocustomerasset_formatted = result["msdyn_converttocustomerasset@OData.Community.Display.V1.FormattedValue"];
           
var _msdyn_defaultvendor_value = result["_msdyn_defaultvendor_value"];
var _msdyn_defaultvendor_value_formatted = result["_msdyn_defaultvendor_value@OData.Community.Display.V1.FormattedValue"];
           
var _msdyn_defaultvendor_value_lookuplogicalname = result["_msdyn_defaultvendor_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
           
var msdyn_fieldserviceproducttype = result["msdyn_fieldserviceproducttype"];
var msdyn_fieldserviceproducttype_formatted = result["msdyn_fieldserviceproducttype@OData.Community.Display.V1.FormattedValue"];
           
var msdyn_purchasename = result["msdyn_purchasename"];
var msdyn_taxable = result["msdyn_taxable"];
var msdyn_taxable_formatted = result["msdyn_taxable@OData.Community.Display.V1.FormattedValue"];
           
var msdyn_upccode = result["msdyn_upccode"];



----------------------------------------------------------------------------------------------------
Early Binding use
----------------------------------------------------------------------------------------------------

var msdyn_ConvertToCustomerAsset = result.msdyn_ConvertToCustomerAsset;
var msdyn_DefaultVendor = result.msdyn_DefaultVendor;
var msdyn_FieldServiceProductType = result.msdyn_FieldServiceProductType;
var msdyn_PurchaseName = result.msdyn_PurchaseName;
var msdyn_Taxable = result.msdyn_Taxable;
var msdyn_UPCCode = result.msdyn_UPCCode;