Tuesday, 6 December 2016
Field Service - Customer Asset - Deep Dive
Customer Assets are a new entity for field resources.
The schema and logical name are msdyn_customerasset.
The fields are: -
Name (string) msdyn_name
Account (Lookup) msdyn_account
Parent Asset(Lookup) msdyn_parentasset
Master Asset (Lookup) msdyn_masterasset
Product (Lookup) msdyn_product
Work Order Product (Lookup) msdyn_workorderproduct
Note that these are mainly lookups, this implies that the entity is a 'link entity'
between other entities. Similar to the classic database example of suppliers and
parts linked by a supplier / part table,
Note the sub asset grid and parent asset support the hierarchical nature of assets.
The Master Asset is used to identify the primary asset.
Note - the work order grid is used to easily view work orders related to the asset. Thus allowing quick reference to what was completed, when it was completed and who completed it etc.
----------------------------------------------------------------------------------------------------------
Late Bound use
----------------------------------------------------------------------------------------------------------
var _msdyn_account_value = result["_msdyn_account_value"];
var _msdyn_account_value_formatted = result["_msdyn_account_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_account_value_lookuplogicalname = result["_msdyn_account_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
var msdyn_customerassetid = result["msdyn_customerassetid"];
var _msdyn_masterasset_value = result["_msdyn_masterasset_value"];
var _msdyn_masterasset_value_formatted = result["_msdyn_masterasset_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_masterasset_value_lookuplogicalname = result["_msdyn_masterasset_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
var msdyn_name = result["msdyn_name"];
var _msdyn_parentasset_value = result["_msdyn_parentasset_value"];
var _msdyn_parentasset_value_formatted = result["_msdyn_parentasset_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_parentasset_value_lookuplogicalname = result["_msdyn_parentasset_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
var _msdyn_product_value = result["_msdyn_product_value"];
var _msdyn_product_value_formatted = result["_msdyn_product_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_product_value_lookuplogicalname = result["_msdyn_product_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
var _msdyn_workorderproduct_value = result["_msdyn_workorderproduct_value"];
var _msdyn_workorderproduct_value_formatted = result["_msdyn_workorderproduct_value@OData.Community.Display.V1.FormattedValue"];
var _msdyn_workorderproduct_value_lookuplogicalname = result["_msdyn_workorderproduct_value@Microsoft.Dynamics.CRM.lookuplogicalname"];
---------------------------------------------------------------------------------------------------------
Early Bound use
---------------------------------------------------------------------------------------------------------
var msdyn_Account = result.msdyn_Account;
var msdyn_customerassetId = result.msdyn_customerassetId;
var msdyn_MasterAsset = result.msdyn_MasterAsset;
var msdyn_name = result.msdyn_name;
var msdyn_ParentAsset = result.msdyn_ParentAsset;
var msdyn_Product = result.msdyn_Product;
var msdyn_WorkOrderProduct = result.msdyn_WorkOrderProduct;
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment