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;

No comments:

Post a Comment