MetadataHelper
The MetadataHelper function helps you fetch the metadata for an entity for a specified RecordType. The IMetadataHelper instance returned when GetMetadataHelper() is called performs the following method:
Method
Task<string> GetRecordTypeIdbyName(string entityName, string recordTypeName);
Example
var metadataHelper = GetMetadataHelper(); var logHelper = GetLogHelper(); var recordTypeId = await metadataHelper.GetRecordTypeIdbyName("Product2", "Master"); logHelper.LogDebug(recordTypeId);
Console Output
012000000000000AAA