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;

No comments:

Post a Comment