What’s coming for Developers in Dynamics 365 Customer Engagement 9.0

Dynamics 365 9.0 is going to introduce many changes for us developers. I would like to share with you my thoughts and hopes regarding the newest version of Dynamics 365 Customer Engagement.

Virtual entities

This feature was announced quite some time ago and it’s great that it’s going to finally be included in version 9.0 of Dynamics 365. What exactly are Virtual Entities? Basically they are entities that are obtained from some external system and they are not stored in D365 database. By properly implementing Retrieve and RetrieveMultiple for such entities, you will be able to show any external data inside CRM lookups and grids. Because there is no database table created for Virtual Entity, it will not use any space in the database, which is a nice feature for Online deployments, where every byte counts. If it will work as described, I’m sure that this particular feature can change the technical approach in many projects.

Web API improvements

Not much to say here – Microsoft already decided to deprecate SOAP endpoint in Dynamics365, so Web API MUST provide all the functionality that was previously in his older brother. Very useful will be GrantAccess and ModifyAccess messages, that will make it easier to handle record sharing using JavaScript. I believe that before 9.0 is publicly released, we will hear about much more new messages available in Web API

Client API enhancements

Of course it’s good thing that Microsoft is tidying up the JS API, which has always been a mess with its inconsistent naming of methods and namespaces which were totally unintuitive. Version 9.0 will introduce a lot (and by a lot I mean really a lot) of changes in this area. I believe that the most crucial change here is replacing Xrm.Page.context with Xrm.Utility.getGlobalContext. I believe that every single D365 deployment out there will require some JavaScript refresh because of that change. I strongly encourage you to read carefully the following article:

https://docs.microsoft.com/en-us/dynamics365/get-started/whats-new/customer-engagement/important-changes-coming#some-client-apis-are-deprecated

Most of the methods are only renamed or replaced by some other methods, but there are some (like addOnKeyPress for example) that will be removed in the next major release after 9.0, so it’s a good thing to remove them from your code right now (and remember not to use them in upcoming projects).

From many introduced methods, I personally believe that relatedEntities collection on entity, getEntityMetadata, getResourceString (related to new RESX support for webresources), show/hideProgressIndicator and refreshParentGrid will be the most important ones. There will be also new methods for controls like editable grid or timer, so hopefully we will have more control over their customization.

Timeline control API

For sure you’ve heard already that in Unified Interface, old control showing Posts, Activities and Notes will be replaced by a Timeline control, which will consolidate everything in one place. This is not only UI specific change – together with the new control we will get quite a few new methods that will allow to customize a little bit this control (which was impossible with the old control) with the most important among the others – refresh function (finally!)

Apps improvements

In Dynamics 365 we already have something called Apps – functionality which allows customizers to pack some pack of functionality (for example regarding Service or Sales) in an App – with specific SiteMap and only specific entities. This feature has proven to be very useful in systems used by many different divisions which not necessarily should have the same functionality exposed (of course by properly handling Security Roles it was always possible to show/hide entities for specific users, but preparing different SiteMaps with specific order of things adapted to current user is very useful and was not possible before Apps were introduced). Version 9.0 will bring us more improvements in this field – with the possibility to create an App using SDK being the most important from my point of view. Also new methods for JS API (getCurrentAppUrl, getCurrentAppName, getCurrentAppProperties) probably will bring new possibilities for ISVs

Multi-select option set

This feature will be really helpful in many scenarios and will probably encourage many customizers to re-create some functionalities in their systems because for sure it can simplify how we can approach things. Previously selecting multiple values was only possible by creating some related entity and showing subgrid on the form, which had many drawbacks (being not able to associate anything before creating record was the most painful). Right now all such scenarios will be handled by this out-of-the-box control and I keep fingers crossed that it will not be as buggy as editable grid, which proven almost unusable in most scenarios, because of the lack of configuration and many bugs.

Custom Controls

For me the most important feature of all, but currently Microsoft did not provide a lot of information regarding this. In theory we will have a framework that will allow us to build custom controls available for all types of devices. If this will be true, that can be a real game changer for Dynamics 365 and maybe the end of “this cannot be done in Dynamics 365” or “this will not work on mobile client” at least from UI perspective. Of course we still don’t know what this magic CCF will be like and what possibilities it will provide, but if it will allow to use HTML5 and whatever JS library you want – I believe that soon we will be flooded with packs of really great reusable controls, totally changing user experience of Dynamics 365

WebHooks integration

WebHooks is a lightweight HTTP pattern for connecting APIs and services with a publish/subscribe model. In a nutshell, it will be possible to register a WebHook for “Lead created” event and whatever client will subscribe to that WebHook will be immediately notified about such event. I believe that this can take integration scenarios to another level – especially for Online deployments it was always a pain to notify any external system (which is usually not in the cloud) that something happened in CRM. Right now this external system can just listen to a specific WebHook and if anything happens it can do whatever needs to be done (for example update some Account specific data). Really cool feature, which of course could have been used earlier but version 9.0 will make it much easier.

Vector image web resources

Using SVG icons will make it easier to apply icons for entities – as you will no longer need to upload both 16×16 and 32×32 icons for each entity. Maybe a small thing, but I think that will be useful.

Support for localizable solutions

The prayers of all ISVs around the globe were heard and we will finally have out-of-the-box localization feature for web resources. It should be possible to create RESX files with different languages and reuse them among web resources using new client-side API. If that’s not awesome, I don’t know what is awesome.

JavaScript Web Resource dependencies

Have you ever added a JavaScript web resource calling function isNaN, just to make it load in current context for reuse in some different web resource? Well, you will not have to do that anymore – in 9.0 it should be possible to define which web resources are dependencies for current resource. This will make our life much easier.

Override the default open behavior of data rows in an entity-bound grid

This feature will allow to override the default “double-click” opening of the record from a grid. If we want to redirect user to some external page after such event – in version 9.0 it will be possible. If it would be also possible to use for Virtual entities, it will make one powerful feature – allowing to redirect user to another system directly from a grid, without any “Ribbon-button” workarounds.

There are many more features to be introduced in 9.0, but I don’t see them as important as the ones that I described (like for example further Business Process Flow enhancements, which personally I believe the least useful feature in the system – although it looks really nice on presentations, in most cases for my clients there was always a show stopper for using this feature and I don’t believe things will change with the next release.

For the full list of new features look here:

https://docs.microsoft.com/en-us/dynamics365/get-started/whats-new/customer-engagement/new-in-july-2017-update-for-developers

List of undocumented SDK messages

I believe that very often, searching for a clue if something can be done in Dynamics 365, you can stumble upon some Message that is not documented in Microsoft Dynamics 365 SDK, but works perfectly fine (like for example ExportToExcel message). I decided to prepare a list of all those messages, together with input and output parameters that they are using. Of course, I will not provide you the documentation – you must experiment with them by yourself. For most of them it’s really clear from their name, what functionality they provide. Remember that all these messages are not in official SDK – they are used internally by CRM, but I would think twice before I would decide to use them in some project (because of their internal nature, they can become obsolete in future releases of CRM without any notice from Microsoft, not like the messages from the offical SDK, but personally I think such scenario is highly unlikely), but some of them look like a great candidates for usage in tools or some helper code for developers. Also if you will find something really useful, please don’t hesitate to post crm idea to add such message into official SDK.

How you can call this messages? It’s simply executing OrganizationRequest with proper parameters from the below table. Look at the following example:

Basically Input Parameters should be inserted in Parameters collection of the OrganizationRequest, and Output Parameters can be obtained from Results collection of the OrganizationResponse.

Here is the promised list of all Messages. Remember that this is to be used only by experienced Dynamics 365 Developers. If you are not sure what are you doing – don’t do it. And don’t test this messages on any important environments – I would suggest to create some local instance for yourself as a playground.

Having said that – have fun!

Request name Parameters
AddDynamicProperty

Input:

  • RegardingObject: Microsoft.Xrm.Sdk.EntityReference
  • DynamicProperty: Microsoft.Xrm.Sdk.Entity

Output:

  • Id: System.Guid
  • DynamicPropertyId: System.Guid
AddEditAppModule

Input:

  • AppModuleComponents: Microsoft.Xrm.Sdk.EntityCollection
  • AppModule: Microsoft.Xrm.Sdk.Entity
  • IsNew: System.Boolean
  • RetainAppModuleComponents: System.Boolean

Output:

  • AppModuleComponentIds: System.Guid[]
AddMembersByFetchXmlList

Input:

  • ListId: System.Guid
  • FetchXml: System.String

Output:

AddOrEditLocation

Input:

  • LocationName: System.String
  • AbsUrl: System.String
  • RegardingObjectId: System.String
  • RelativePath: System.String
  • RegardingObjType: System.Int32
  • ParentType: System.Int32
  • ParentId: System.String
  • IsAddOrEditMode: System.Boolean
  • IsCreateFolder: System.Boolean
  • DocumentId: System.String

Output:

  • LocationId: System.String
ApplyProfileRule

Input:

  • Target: Microsoft.Xrm.Sdk.EntityReference

Output:

AssignAllRecordsTeam

Input:

  • OldOwnerId: System.Guid
  • OldOwnerType: System.Int32
  • NewOwnerId: System.Guid
  • NewOwnerType: System.Int32

Output:

AssociateKnowledgeArticle

Input:

  • RegardingObjectId: System.Guid
  • RegardingObjectTypeCode: System.Int32
  • AssociationRelationshipName: System.String
  • KnowledgeArticleId: System.Guid

Output:

AuthenticateAndFetchACIData

Input:

  • EntityName: System.String
  • EntityRecordId: System.Guid
  • ACIRequestURI: System.String

Output:

  • ACIResponse: System.String
BestTimeToEmail

Input:

  • EntityReferenceCollection: Microsoft.Xrm.Sdk.EntityReferenceCollection

Output:

  • PreferredTime: System.DateTime
BuildTopicModel

Input:

  • TopicModelId: System.Guid

Output:

BulkDeleteImportedRecords

Input:

  • TargetEntityName: System.String
  • ImportSequenceNumber: System.Int32
  • ImportId: System.Guid
  • DeleteImportHistory: System.Boolean
  • JobName: System.String
  • SendEmailNotification: System.Boolean
  • ToRecipients: System.String
  • CCRecipients: System.String
  • RecurrencePattern: System.String
  • SourceImportId: System.Guid

Output:

  • JobId: System.Guid
BulkOperationStatusClose

Input:

  • BulkOperationId: System.Guid
  • FailureCount: System.Int32
  • SuccessCount: System.Int32
  • StatusReason: System.Int32
  • ErrorCode: System.Int32

Output:

CalculateTriggerDateTime

Input:

  • CalendarId: System.Guid
  • StartTime: System.DateTime
  • TriggerDuration: System.Int32

Output:

  • result: System.DateTime
CanCloseOpportunity

Input:

  • OpportunityId: System.Guid
  • QuoteId: System.Guid
  • NewStatus: System.Int32

Output:

  • CanClose: System.Boolean
CanUserSendEmail

Input:

Output:

  • HasPrivileges: System.Boolean
CheckClientCompatibility

Input:

  • CrmClientVersion: System.String

Output:

  • Result: System.Int32
CheckInDocument

Input:

  • Entity: Microsoft.Xrm.Sdk.Entity
  • CheckInComments: System.String
  • RetainCheckout: System.Boolean

Output:

CheckInSharePointDocument

Input:

  • DocumentId: System.String
  • CheckInComments: System.String
  • RetainCheckout: System.Boolean
  • SiteUrl: System.String
  • DocumentLocation: System.String
  • ReferencedEntity: System.String

Output:

CheckNotifications

Input:

  • Events: System.Int32[]
  • LastChecked: System.DateTime

Output:

  • EntityCollection: Microsoft.Xrm.Sdk.EntityCollection
CheckoutDocument

Input:

  • Entity: Microsoft.Xrm.Sdk.Entity

Output:

CheckoutSharePointDocument

Input:

  • DocumentId: System.String
  • SiteUrl: System.String
  • DocumentLocation: System.String
  • ReferencedEntity: System.String

Output:

CheckRouterCompatibility

Input:

  • CrmRouterVersion: System.String

Output:

  • Result: System.Int32
CleanUpBulkOperation

Input:

  • BulkOperationId: System.Guid
  • BulkOperationSource: System.Int32

Output:

CloneProductAssociation

Input:

  • Source: Microsoft.Xrm.Sdk.EntityReference

Output:

CloseOpportunity

Input:

  • OpportunityId: Microsoft.Xrm.Sdk.EntityReference
  • Status: Microsoft.Xrm.Sdk.OptionSetValue
  • ActualRevenue: Microsoft.Xrm.Sdk.Money
  • CompetitorId: Microsoft.Xrm.Sdk.EntityReference
  • CloseDate: System.DateTime
  • Description: System.String

Output:

ConfigureReportingDataConnector

Input:

  • DataProviderType: System.Int32

Output:

ConvertActivity

Input:

  • ActivityId: System.Guid
  • ActivityEntityName: System.String
  • TargetEntity: Microsoft.Xrm.Sdk.Entity
  • TargetEntityName: System.String
  • CreateCampaignResponse: System.Boolean

Output:

  • RecordId: System.Guid
ConvertCampaignResponse

Input:

  • CampaignResponse: Microsoft.Xrm.Sdk.EntityReference
  • EntityName: System.String
  • CreateOpportunityForExistingCustomer: System.Boolean
  • Customer: Microsoft.Xrm.Sdk.EntityReference
  • Currency: Microsoft.Xrm.Sdk.EntityReference
  • Owner: Microsoft.Xrm.Sdk.EntityReference

Output:

  • EntityReference: Microsoft.Xrm.Sdk.EntityReference
CopySharePointDocuments

Input:

  • DestinationLocation: System.String
  • AbsoluteUrls: System.String[]
  • RelativeUrls: System.String[]
  • Source: System.String

Output:

  • Status: System.String
CreateAndAssociate

Input:

  • RegardingObjectId: System.Guid
  • RegardingObjectTypeCode: System.Int32
  • AssociationRelationshipName: System.String
  • Article: Microsoft.Xrm.Sdk.Entity

Output:

CreateDocumentLibraries

Input:

  • DocumentLibraryNames: System.String
  • Url: System.String

Output:

  • DocumentLibraryResult: System.String
CreateEmailReplyDraft

Input:

  • MessageId: System.String
  • ReplyText: System.String

Output:

  • MailWebLink: System.String
CreateFolderAndNewDocuments

Input:

  • FolderName: System.String
  • FileNameList: System.String[]
  • RegardingObjectType: System.Int32
  • RegardingObjectId: System.String
  • LocationType: System.Int32
  • ParentLocationId: System.String

Output:

  • LocationId: System.Guid
CreateFolder

Input:

  • FolderName: System.String
  • RegardingObjectType: System.Int32
  • RegardingObjectId: System.String
  • DocumentType: System.Int32
  • ParentLocationId: System.String
  • SiteType: System.Int32
  • ValidateFolder: System.Boolean

Output:

  • LocationId: System.Guid
CreateFromTemplate

Input:

  • WizardXml: System.String
  • IsOrgReport: System.Boolean

Output:

  • id: System.Guid
CreateOrUpdateImportMapFromApp

Input:

  • MapXml: System.String
  • ColMappingIdsToDelete: System.Guid[]

Output:

  • ImportMapId: System.Guid
CreateOutlookSubscriptionSubscriptionClients

Input:

  • Target: Microsoft.Xrm.Sdk.Entity

Output:

  • id: System.Guid
CreatePostRelationships

Input:

  • EntityLogicalName: System.String

Output:

CreateProducts

Input:

  • Entities: Microsoft.Xrm.Sdk.EntityCollection
  • ParentEntity: Microsoft.Xrm.Sdk.Entity

Output:

  • EntityCollection: Microsoft.Xrm.Sdk.EntityCollection
CreateRecommendationModelVersion

Input:

  • RecommendationModelId: System.Guid
  • Target: Microsoft.Xrm.Sdk.Entity

Output:

  • id: System.Guid
CreateSchedule

Input:

  • ReportId: System.Guid
  • ScheduleXml: System.String
  • ParameterXml: System.String
  • ScheduledReportName: System.String

Output:

  • id: System.Guid
CreateSharePointDocumentLibraries

Input:

  • DocumentLibraryNames: System.String[]
  • Url: System.String

Output:

  • Status: System.String[]
CreateSharePointFolderAndUploadDocuments

Input:

  • FolderName: System.String
  • Path: System.String
  • DocumentLibrary: System.String
  • SiteUrl: System.String
  • IsNoteBookFolder: System.Boolean
  • FileName: System.String[]
  • DocumentContents: System.String[]

Output:

  • FileEditUrls: System.String[]
CreateSharePointFolder

Input:

  • FolderName: System.String
  • Path: System.String
  • DocumentLibrary: System.String
  • SiteUrl: System.String
  • IsNoteBookFolder: System.Boolean

Output:

CreateSubscriptionSyncInfo

Input:

  • Target: Microsoft.Xrm.Sdk.Entity

Output:

CreateWithMappingImportMap

Input:

  • ImportMap: Microsoft.Xrm.Sdk.Entity
  • ColumnMappings: Microsoft.Xrm.Sdk.EntityCollection
  • PickListMappings: Microsoft.Xrm.Sdk.EntityCollection
  • LookUpMappings: Microsoft.Xrm.Sdk.EntityCollection
  • OwnerMappings: Microsoft.Xrm.Sdk.EntityCollection
  • TransformationMappings: Microsoft.Xrm.Sdk.EntityCollection
  • TransformationParameterMappings: Microsoft.Xrm.Sdk.EntityCollection

Output:

  • Id: System.Guid
DebugCacheGetContents

Input:

  • CacheName: System.String

Output:

  • CacheItems: Microsoft.Crm.Sdk.Messages.CacheItem[]
DebugCacheGetSize

Input:

  • CacheName: System.String
  • OutputFormat: System.String
  • IncludeLogs: System.Boolean

Output:

  • CacheSizeDetails: System.String
DebugFlushCache

Input:

  • CacheName: System.String

Output:

DebugGenerateFault

Input:

  • FaultType: Microsoft.Crm.Sdk.Messages.FaultType

Output:

DebugRetrievePipelinePerformanceResult

Input:

  • WebRequestId: System.Guid

Output:

  • PerformanceResult: System.String
DebugTraceBufferGetContents

Input:

Output:

  • TraceBuffer: System.String[]
  • TraceBufferSizeSetting: System.Int32
DeleteDocument

Input:

  • Entities: Microsoft.Xrm.Sdk.EntityCollection

Output:

DeleteRecommendationModel

Input:

  • Target: Microsoft.Xrm.Sdk.EntityReference

Output:

  • IsModelDeletedInAzure: System.Boolean
DeleteRecommendationModelVersion

Input:

  • Target: Microsoft.Xrm.Sdk.EntityReference

Output:

  • IsBuildIdDeletedInAzure: System.Boolean
DeleteSharePointDocument

Input:

  • DocumentIds: System.String[]
  • SiteUrl: System.String
  • DocumentLocation: System.String
  • ReferencedEntity: System.String

Output:

DisassociateKnowledgeArticle

Input:

  • RegardingObjectId: System.Guid
  • RegardingObjectTypeCode: System.Int32
  • AssociationRelationshipName: System.String
  • KnowledgeArticleId: System.Guid

Output:

DiscardDocumentCheckout

Input:

  • Entity: Microsoft.Xrm.Sdk.Entity

Output:

DiscardSharePointDocumentCheckout

Input:

  • DocumentId: System.String
  • SiteUrl: System.String
  • DocumentLocation: System.String
  • ReferencedEntity: System.String

Output:

EditDocumentProperties

Input:

  • Entity: Microsoft.Xrm.Sdk.Entity

Output:

EditSharePointDocumentProperties

Input:

  • DocumentId: System.String
  • FullName: System.String
  • Title: System.String
  • SiteUrl: System.String
  • DocumentLocation: System.String
  • ReferencedEntity: System.String

Output:

EnableNewFormsForAllUsers

Input:

Output:

ExecuteDataPerformanceAction

Input:

  • QueryingUnitId: System.Guid
  • ActionName: System.String

Output:

ExecuteQuickFind

Input:

  • SearchText: System.String
  • EntityGroupName: System.String
  • EntityNames: System.String[]

Output:

  • Result: Microsoft.Xrm.Sdk.QuickFindResultCollection
ExpandWorkflows

Input:

  • ExpansionTaskId: System.Guid

Output:

ExportDynamicToExcel

Input:

  • View: Microsoft.Xrm.Sdk.EntityReference
  • FetchXml: System.String
  • LayoutXml: System.String
  • ExportType: Microsoft.Crm.Sdk.Messages.ExportDynamicToExcelType
  • PostData: System.String
  • IsRefresh: System.Boolean
  • QueryApi: System.String
  • QueryParameters: Microsoft.Crm.Sdk.Messages.InputArgumentCollection

Output:

  • ExcelFile: System.Byte[]
ExportFullSolution

Input:

  • SolutionName: System.String

Output:

  • ExportSolutionFile: System.Byte[]
ExportLinearMappingsImportMap

Input:

  • ImportMapId: System.Guid

Output:

  • MappingsXml: System.String
ExportTemplateToExcelOnline

Input:

  • Template: Microsoft.Xrm.Sdk.EntityReference
  • FetchXml: System.String
  • QueryApi: System.String
  • QueryParameters: Microsoft.Crm.Sdk.Messages.InputArgumentCollection

Output:

  • EditLink: System.String
ExportTemplateToExcel

Input:

  • EntityLocalizedDisplayName: System.String
  • LayoutXml: System.String
  • FetchXml: System.String

Output:

  • ExcelFile: System.Byte[]
ExportTemplateToWord

Input:

  • EntityTypeCode: System.Int32
  • SelectedEntities: System.String

Output:

  • WordFile: System.Byte[]
ExportToExcelOnline

Input:

  • View: Microsoft.Xrm.Sdk.EntityReference
  • FetchXml: System.String
  • LayoutXml: System.String
  • QueryApi: System.String
  • QueryParameters: Microsoft.Crm.Sdk.Messages.InputArgumentCollection

Output:

  • EditLink: System.String
ExportToExcel

Input:

  • View: Microsoft.Xrm.Sdk.EntityReference
  • FetchXml: System.String
  • LayoutXml: System.String
  • QueryApi: System.String
  • QueryParameters: Microsoft.Crm.Sdk.Messages.InputArgumentCollection

Output:

  • ExcelFile: System.Byte[]
ExportWordDocument

Input:

  • EntityTypeCode: System.Int32
  • SelectedTemplate: Microsoft.Xrm.Sdk.EntityReference
  • SelectedRecords: System.String

Output:

  • WordFile: System.Byte[]
FetchSiteUrl

Input:

  • DocumentId: System.String
  • RegardingObjectId: System.String
  • RegardingObjType: System.Int32

Output:

  • SiteAndLocationUrl: System.String
FireNotificationEvent

Input:

  • EventType: System.Int32
  • EventData: System.String

Output:

FlushMetadataCache

Input:

Output:

FollowEmailAttachment

Input:

  • ActivityMimeAttachmentId: System.Guid

Output:

  • Response: System.String
FollowInYammer

Input:

  • Target: Microsoft.Xrm.Sdk.Entity

Output:

GenerateNumber

Input:

  • PrefixName: System.String
  • CurrentNumberName: System.String
  • AddSuffix: System.Boolean

Output:

  • GeneratedNumber: System.String
GenerateSnapshot

Input:

  • ReportId: System.Guid

Output:

GetActualDate

Input:

  • Date: System.String

Output:

  • Result: System.String
GetAssociatedDocuments

Input:

  • AssociatedDocumentsRequestParams: System.String

Output:

  • BusinessEntityCollection: System.Object
GetAzureServiceConnectionIdByType

Input:

  • ConnectionType: System.Int32

Output:

  • ConnectionId: System.Guid
GetCommitmentSubjects

Input:

  • ActivityIds: System.Guid[]

Output:

  • Subjects: System.String[]
GetComponents

Input:

  • CustomizationFile: System.Byte[]

Output:

  • GetComponents: System.String
GetCurrentServerDateTimeInUtc

Input:

  • EntityName: System.String
  • EntityId: System.String

Output:

  • ServerDateTime: System.String
GetDataForTopicWordCloud

Input:

  • Filter: System.String

Output:

  • Topics: System.String
GetDefaultDocumentLibrary

Input:

  • SiteUrl: System.String

Output:

  • DefaultDocumentLibrary: System.String
GetEmailLinkTrackingUrls

Input:

  • TrackingId: System.Guid
  • ConversationTrackingId: System.Guid
  • ClientType: System.String
  • EmailLinkUrls: System.String[]

Output:

  • EmailLinkTrackingUrls: System.String[]
GetEmailTrackingPixelUrl

Input:

  • TrackingId: System.Guid
  • ConversationTrackingId: System.Guid
  • ClientType: System.String

Output:

  • EmailTrackingPixelUrl: System.String
GetEntitiesForAzureML

Input:

  • Filter: System.String

Output:

  • Result: System.String
GetEntityWiseDuplicatesCount

Input:

  • Entity: Microsoft.Xrm.Sdk.Entity

Output:

  • DuplicatesCount: System.Int32[]
  • EntityLogicalNames: System.String[]
GetFieldListForAzureML

Input:

  • EntityName: System.String
  • Filter: System.String

Output:

  • Result: System.String
GetMailMergeTargetEntityType

Input:

  • CampaignActivityId: System.Guid

Output:

  • EntityType: System.Int32
GetOutlookSyncDataSubscriptionClients

Input:

  • ClientId: System.Guid
  • EntityName: System.String
  • SyncAction: Microsoft.Crm.Sdk.Messages.SyncAction
  • BatchSize: System.Int32
  • ColumnSetXml: System.String

Output:

  • SyncDataXml: System.String
GetRecommendationModelId

Input:

Output:

  • id: System.Guid
GetRecommendationModelVersionOverLimit

Input:

  • RecommendationModelId: System.Guid

Output:

  • BusinessEntity: System.Object
GetRecommendations

Input:

  • VersionId: System.Guid
  • ItemIds: System.Guid[]
  • NumberOfResults: System.Int32

Output:

  • EntityCollection: Microsoft.Xrm.Sdk.EntityCollection
GetRelationshipsForAzureML

Input:

  • EntityName: System.String
  • Filter: System.String

Output:

  • Result: System.String
GetReportParameters

Input:

  • ReportId: System.Guid

Output:

  • ParametersXml: System.String
GetRIProvisioningStatus

Input:

Output:

  • ProvisioningStatus: System.String
GetRITenantEndpointUrl

Input:

Output:

  • TenantEndpointUrl: System.String
GetSimilarRecords

Input:

  • Id: Microsoft.Xrm.Sdk.EntityReference

Output:

  • EntityCollection: Microsoft.Xrm.Sdk.EntityCollection
GetSyncDataSubscription

Input:

  • SubscriptionId: System.Guid
  • EntityName: System.String
  • SyncAction: Microsoft.Crm.Sdk.Messages.SyncAction
  • BatchSize: System.Int32
  • ColumnSetXml: System.String

Output:

  • SyncDataXml: System.String
GetTrackingServiceBaseUrl

Input:

Output:

  • TrackingServiceBaseUrl: System.String
GetUnprocessedRecords

Input:

  • EntityName: System.String
  • Columns: System.String[]
  • RuleId: System.Guid
  • PageSize: System.Int32

Output:

  • UnprocessedRecords: Microsoft.Xrm.Sdk.EntityCollection
  • VersionNumbers: System.String[]
GetValidStatusTransition

Input:

  • IncidentId: System.String
  • ToStateCode: System.Int32

Output:

  • Result: System.Int32
ImportLinearMappingsImportMap

Input:

  • MappingsXml: System.String
  • ReplaceIds: System.Boolean

Output:

  • ImportMapId: System.Guid
IntersectRecordsWithQueueAndAggregate

Input:

  • QueueId: System.Guid
  • ViewId: System.Guid
  • VisualizationId: System.Guid
  • InteractionCentricFilterXml: System.String

Output:

  • EntityCollection: Microsoft.Xrm.Sdk.EntityCollection
InviteUser

Input:

  • UserId: System.Guid

Output:

  • InvitationToken: System.String
IsPartnerSolutionInstalled

Input:

  • SolutionName: System.String

Output:

  • IsPartnerSolutionInstalled: System.Boolean
IsPrimaryClientSubscriptionClients

Input:

  • ClientId: System.Guid

Output:

  • isPrimaryClient: System.Boolean
IsReportingDataConnectorInstalled

Input:

  • DataProviderType: System.Int32

Output:

  • IsReportingDataConnectorInstalled: System.Boolean
IsServerWorkgroup

Input:

Output:

  • IsWorkgroup: System.Boolean
IsSupportUserRole

Input:

  • RoleId: System.Guid

Output:

  • SupportUserRole: System.Boolean
IsSystemAdministratorRole

Input:

  • RoleId: System.Guid

Output:

  • SystemAdministratorRole: System.Boolean
ListSnapshots

Input:

  • ReportId: System.Guid

Output:

  • HistoryIds: System.String[]
  • CreatedDates: System.DateTime[]
LogExternalResultsClicked

Input:

  • Source: System.String

Output:

LogFailureBulkOperation

Input:

  • BulkOperationId: System.Guid
  • RegardingObjectId: System.Guid
  • RegardingObjectTypeCode: System.Int32
  • ErrorCode: System.Int32
  • Message: System.String
  • AdditionalInfo: System.String

Output:

LogSuccessBulkOperation

Input:

  • BulkOperationId: System.Guid
  • RegardingObjectId: System.Guid
  • RegardingObjectTypeCode: System.Int32
  • CreatedObjectId: System.Guid
  • CreatedObjectTypeCode: System.Int32
  • AdditionalInfo: System.String

Output:

MigrateToS2S

Input:

  • SiteUrl: System.String
  • EnableOneDrive: System.Boolean

Output:

MobileOfflineDeprovision

Input:

Output:

MobileOfflineProvision

Input:

Output:

MyExecuteCampaignActivity

Input:

  • CampaignActivityId: System.Guid
  • Propagate: System.Boolean
  • ActivityXml: System.String
  • TemplateId: System.Guid
  • OwnershipOptions: Microsoft.Crm.Sdk.Messages.PropagationOwnershipOptions
  • PostWorkflowEvent: System.Boolean
  • Owner: Microsoft.Xrm.Sdk.EntityReference
  • SendEmail: System.Boolean
  • QueueId: System.Guid

Output:

  • BulkOperationId: System.Guid
NavigateToNextEntity

Input:

  • CurrentEntityId: System.Guid
  • CurrentEntityLogicalName: System.String
  • NextEntityId: System.Guid
  • NextEntityLogicalName: System.String
  • NewActiveStageId: System.Guid
  • NewTraversedPath: System.String
  • ProcessId: System.Guid
  • ProcessInstanceId: System.Guid

Output:

NewDocument

Input:

  • FileName: System.String
  • RegardingObjectId: System.String
  • RegardingObjectTypeCode: System.String
  • LocationId: System.String

Output:

  • EditLink: System.String
OverrideDynamicProperties

Input:

  • RegardingObject: Microsoft.Xrm.Sdk.EntityReference
  • DynamicPropertyCollection: Microsoft.Xrm.Sdk.EntityCollection

Output:

OverrideDynamicProperty

Input:

  • RegardingObject: Microsoft.Xrm.Sdk.EntityReference
  • DynamicProperty: Microsoft.Xrm.Sdk.EntityReference

Output:

  • Id: System.Guid
  • DynamicPropertyId: System.Guid
OverwriteDynamicProperty

Input:

  • RegardingObject: Microsoft.Xrm.Sdk.EntityReference
  • DynamicProperty: Microsoft.Xrm.Sdk.EntityReference

Output:

  • Id: System.Guid
  • DynamicPropertyId: System.Guid
PopulateCard

Input:

  • UserId: System.Guid

Output:

  • Data: System.String
PopulateRecommendationCacheForRecord

Input:

  • ParentRecord: Microsoft.Xrm.Sdk.EntityReference

Output:

  • ShowAzureRecommendations: System.Boolean
PopulateRecommendationCache

Input:

  • EntityName: System.String
  • ItemId: System.Guid

Output:

  • ShowAzureRecommendations: System.Boolean
PostOutlookSyncSubscriptionClients

Input:

  • ClientId: System.Guid
  • EntityName: System.String
  • SyncAction: Microsoft.Crm.Sdk.Messages.SyncAction
  • BatchSize: System.Int32

Output:

PostSyncSubscription

Input:

  • SubscriptionId: System.Guid
  • EntityName: System.String
  • SyncAction: Microsoft.Crm.Sdk.Messages.SyncAction
  • BatchSize: System.Int32

Output:

PrepareOutlookSyncSubscriptionClients

Input:

  • ClientId: System.Guid
  • Type: System.Int32

Output:

  • SyncInfoXml: System.String
PrepareSyncSubscription

Input:

  • SubscriptionId: System.Guid
  • Type: System.Int32

Output:

  • SyncInfoXml: System.String
ProcessOneMemberBulkOperation

Input:

  • BulkOperationId: System.Guid
  • Entity: Microsoft.Xrm.Sdk.Entity
  • BulkOperationSource: System.Int32

Output:

  • ProcessResult: System.Int32
ProcessReplicationBacklog

Input:

  • Target: Microsoft.Xrm.Sdk.EntityReference

Output:

PromoteToAdmin

Input:

  • UserId: System.Guid

Output:

PublishAppModule

Input:

  • AppModuleId: System.Guid

Output:

PublishExternal

Input:

  • ReportId: System.Guid

Output:

PublishKnowledgeArticle

Input:

  • Entity: Microsoft.Xrm.Sdk.Entity
  • CopyRelatedProductFromAssociatedPrimary: System.Boolean
  • CopyRelatedCategoryFromAssociatedPrimary: System.Boolean
  • PublishApprovedRelatedTranslations: System.Boolean

Output:

  • IsPublish: System.Boolean
PublishResourceGroups

Input:

Output:

RegisterSolution

Input:

  • PluginAssembly: Microsoft.Xrm.Sdk.Entity
  • Steps: Microsoft.Crm.Sdk.Messages.SdkMessageProcessingStepRegistration[]

Output:

  • PluginAssemblyId: System.Guid
RemoveClientFromSubscriptionSubscriptionClients

Input:

  • ClientId: System.Guid

Output:

RemoveDynamicProperty

Input:

  • RegardingObject: Microsoft.Xrm.Sdk.EntityReference
  • DynamicProperty: Microsoft.Xrm.Sdk.EntityReference

Output:

RemoveMembersByFetchXmlList

Input:

  • ListId: System.Guid
  • FetchXml: System.String
  • KeepReturned: System.Boolean

Output:

RenameFolderNameForOneDrive

Input:

  • FolderName: System.String

Output:

RenameFolderName

Input:

  • SiteUrl: System.String
  • FolderPath: System.String
  • NewFolderName: System.String

Output:

RenderTemplateFromView

Input:

  • Template: Microsoft.Xrm.Sdk.EntityReference
  • View: Microsoft.Xrm.Sdk.EntityReference

Output:

  • ExcelFile: System.Byte[]
RenderTemplate

Input:

  • Template: Microsoft.Xrm.Sdk.EntityReference
  • FetchXml: System.String
  • QueryApi: System.String
  • QueryParameters: Microsoft.Crm.Sdk.Messages.InputArgumentCollection

Output:

  • ExcelFile: System.Byte[]
ResetPerformanceReport

Input:

Output:

ResetSyncStateSubscription

Input:

  • SubscriptionId: System.Guid
  • ResetSyncInfo: Microsoft.Crm.Sdk.Messages.ResetSyncStateInfo[]

Output:

ResolveEmailAddress

Input:

  • EmailAddresses: System.String
  • ObjectTypeCodes: System.Int32[]

Output:

  • Entities: Microsoft.Xrm.Sdk.EntityCollection
ResolveIncident

Input:

  • IncidentId: Microsoft.Xrm.Sdk.EntityReference
  • Status: Microsoft.Xrm.Sdk.OptionSetValue
  • BillableTime: System.Int32
  • Resolution: System.String
  • Remarks: System.String

Output:

ResolveQuote

Input:

  • Subject: System.String
  • Status: Microsoft.Xrm.Sdk.OptionSetValue
  • QuoteId: Microsoft.Xrm.Sdk.EntityReference
  • Description: System.String
  • CloseDate: System.DateTime

Output:

RetrieveAADAccessToken

Input:

  • ClientId: System.String
  • ServerId: System.String
  • Tenant: System.String

Output:

  • AccessToken: System.String
RetrieveAttributeList

Input:

  • RegardingObjectTypeCode: System.Int32

Output:

  • Result: System.String
RetrieveBusinessRulesForForm

Input:

  • EntityTypeCode: System.Int32
  • FormId: System.Guid
  • BusinessProcessId: System.Guid
  • IncludeDraftRules: System.Boolean
  • DetailGridTypeCollectionString: System.String
  • IsHomePage: System.Boolean
  • IsAssociatedGrid: System.Boolean

Output:

  • BusinessRulesScript: System.String
RetrieveCardData

Input:

  • CardTypeId: System.Guid
  • AdditionalParameter: System.String

Output:

  • Data: System.String
RetrieveClientSubscriptionSubscriptionClients

Input:

  • ClientId: System.Guid
  • ColumnSet: Microsoft.Xrm.Sdk.Query.ColumnSet

Output:

  • Entity: Microsoft.Xrm.Sdk.Entity
RetrieveCollation

Input:

Output:

  • Result: System.String
RetrieveCustomersNotPlacedOrders

Input:

  • Query: Microsoft.Xrm.Sdk.Query.QueryBase

Output:

  • EntityCollection: Microsoft.Xrm.Sdk.EntityCollection
RetrieveDashboardForms

Input:

  • SystemUserId: System.Guid
  • AppModuleId: System.Guid

Output:

  • SystemForms: Microsoft.Xrm.Sdk.EntityReferenceCollection
RetrieveDefaultStatusForState

Input:

  • EntityName: System.String
  • State: Microsoft.Xrm.Sdk.OptionSetValue

Output:

  • Status: Microsoft.Xrm.Sdk.OptionSetValue
RetrieveDocumentsFromAllLocationsAndShared

Input:

  • Query: Microsoft.Xrm.Sdk.Query.QueryBase
  • AllSitesAndLocations: System.String
  • ReferencedEntity: System.String
  • PageToken: System.String
  • SharedDocuments: System.Boolean

Output:

  • BusinessEntityCollection: System.Object
RetrieveDocumentTemplates

Input:

  • EntityTypeCode: System.Int32
  • DocumentType: System.Int32

Output:

  • DocumentTemplateEntityCollection: Microsoft.Xrm.Sdk.EntityCollection
RetrieveEntitiesForAggregateQuery

Input:

  • OuterQuery: Microsoft.Xrm.Sdk.Query.QueryBase
  • SubQueries: Microsoft.Crm.Sdk.Messages.QueryByEntityNameDictionary

Output:

  • EntityCollection: Microsoft.Xrm.Sdk.EntityCollection
RetrieveEntitiesToFilter

Input:

  • CampaignActivityId: System.Guid
  • EntityName: System.String

Output:

  • EntityCollection: Microsoft.Xrm.Sdk.EntityCollection
RetrieveEntitiesToMailMerge

Input:

  • CampaignActivityId: System.Guid
  • Query: Microsoft.Xrm.Sdk.Query.QueryBase
  • EntityName: System.String

Output:

  • EntityCollection: Microsoft.Xrm.Sdk.EntityCollection
RetrieveEntitiesToSync

Input:

  • ClientId: System.Guid
  • EntityName: System.String
  • SyncAction: Microsoft.Crm.Sdk.Messages.SyncAction
  • BatchSize: System.Int32
  • ColumnSetXml: System.String

Output:

  • EntityCollection: Microsoft.Xrm.Sdk.EntityCollection
RetrieveEntitlementsForCase

Input:

  • CustomerId: System.String
  • PrimaryContactId: System.String
  • ProductId: System.String
  • Query: Microsoft.Xrm.Sdk.Query.QueryBase

Output:

  • EntityCollection: Microsoft.Xrm.Sdk.EntityCollection
RetrieveEntityDynamicPropertyDefinitions

Input:

  • RegardingObject: Microsoft.Xrm.Sdk.EntityReference
  • ForDraftRegarding: System.Boolean

Output:

  • EntityCollection: Microsoft.Xrm.Sdk.EntityCollection
RetrieveEntityGroupConfiguration

Input:

  • EntityGroupName: System.String

Output:

  • EntityGroupConfiguration: Microsoft.Xrm.Sdk.QuickFindConfigurationCollection
RetrieveEntityXml

Input:

  • EntityName: System.String

Output:

  • EntityXml: System.String
RetrieveExternalRequiredComponents

Input:

  • ComponentId: System.Guid
  • ComponentType: System.Int32
  • IncludeSubcomponents: System.Boolean
  • SolutionUniqueName: System.String

Output:

  • EntityCollection: Microsoft.Xrm.Sdk.EntityCollection
RetrieveExternalRoots

Input:

  • ComponentId: System.Guid
  • ComponentType: System.Int32

Output:

  • EntityCollection: Microsoft.Xrm.Sdk.EntityCollection
RetrieveFilteredProcesses

Input:

  • EntityLogicalName: System.String

Output:

  • Processes: Microsoft.Xrm.Sdk.EntityCollection
RetrieveImportJobProgress

Input:

  • ImportJobId: System.Guid

Output:

  • Progress: System.String
RetrieveItemIdsForRecord

Input:

  • ParentRecord: Microsoft.Xrm.Sdk.EntityReference

Output:

  • ItemIds: System.Guid[]
RetrieveKeyPhrasesForKnowledgeSearch

Input:

  • Target: Microsoft.Xrm.Sdk.EntityReference

Output:

  • KeyPhrases: System.String[]
RetrieveKeyPhrasesForSimilaritySearch

Input:

  • Target: Microsoft.Xrm.Sdk.EntityReference

Output:

  • KeyPhrases: System.String[]
RetrieveLanguagesAvailableForProvisioning

Input:

Output:

  • LanguagesAvailableForProvisioning: System.Int32[]
RetrieveMetadataChangesForRichClient

Input:

  • LastTimestamp: System.Int64
  • LastSyncTime: System.DateTime
  • LastUserLanguage: System.Int32
  • MetadataVersion: System.String

Output:

  • SyncType: System.Byte
  • NewTimestamp: System.Int64
  • NewSyncTime: System.DateTime
  • NewUserLanguage: System.Int32
  • NewCalculatedTimestamp: System.String
  • AddedOrUpdatedLocalizedLabelMetadata: System.Byte[]
  • AddedOrUpdatedOtherMetadata: System.Byte[]
  • DeletedMetadata: System.Byte[]
RetrieveMetadataForRichClient

Input:

Output:

  • Metadata: System.Byte[]
RetrieveMultipleSystemFormsWithAllLabels

Input:

  • Query: Microsoft.Xrm.Sdk.Query.QueryBase

Output:

  • EntityCollection: Microsoft.Xrm.Sdk.EntityCollection
RetrieveOfficeGroupsSetting

Input:

  • SettingType: System.Int32

Output:

  • Setting: System.String
RetrieveOptionalFeatureStatus

Input:

  • Name: System.String

Output:

  • IsEnabled: System.Boolean
  • InstallationStatus: System.Int32
RetrievePerformanceReport

Input:

  • DumpStrategy: System.Int32
  • FilterByOrganization: System.Boolean
  • FilterByTestName: System.String

Output:

  • ReportXml: System.String
RetrievePersonalSite

Input:

  • SiteUrl: System.String

Output:

  • PersonalSiteUrl: System.String
  • MainSiteUrl: System.String
RetrievePersonalSiteUrl

Input:

Output:

  • PersonalSiteUrl: System.String
RetrievePrivilegeMaxDepthFromTeamRoles

Input:

  • UserId: System.Guid

Output:

  • RolePrivileges: Microsoft.Crm.Sdk.Messages.RolePrivilege[]
RetrieveProcessActiveStage

Input:

  • EntityId: System.Guid
  • EntityLogicalName: System.String
  • ProcessId: System.Guid
  • ProcessInstanceId: Microsoft.Xrm.Sdk.EntityReference

Output:

  • Entity: Microsoft.Xrm.Sdk.Entity
RetrieveProcessControlData

Input:

  • Target: Microsoft.Xrm.Sdk.EntityReference
  • ProcessId: Microsoft.Xrm.Sdk.EntityReference
  • ProcessInstanceId: Microsoft.Xrm.Sdk.EntityReference

Output:

  • Entity: Microsoft.Xrm.Sdk.Entity
  • GlobalNavigationData: Microsoft.Xrm.Sdk.Entity
RetrieveProcessWithFallback

Input:

  • EntityLogicalName: System.String
  • Process: Microsoft.Xrm.Sdk.EntityReference
  • AppModuleId: System.Guid

Output:

  • Entity: Microsoft.Xrm.Sdk.Entity
RetrievePublishedAppModuleWithLocale

Input:

  • LcId: System.Int32

Output:

  • AppModuleCollection: Microsoft.Crm.Sdk.Messages.AppModuleCollection
RetrieveRecommendationLineItemMetadata

Input:

  • ParentEntityName: System.String

Output:

  • RecommendationLineItemMetadata: System.String
RetrieveRecommendationLineItemProducts

Input:

  • ParentEntityName: System.String
  • ParentEntityId: System.Guid

Output:

  • RecommendationLineItemProducts: System.String
RetrieveRecommendationsCount

Input:

  • ParentRecord: Microsoft.Xrm.Sdk.EntityReference
  • PriceLevelId: System.Guid

Output:

  • RecommendationsCount: System.Int32
RetrieveReferenceSiteMap

Input:

Output:

  • Entity: Microsoft.Xrm.Sdk.Entity
RetrieveReportSqlFromQuery

Input:

  • FetchXml: System.String
  • UseStoredProcedures: System.Boolean
  • RetrieveAllColumns: System.Boolean

Output:

  • ReportSql: System.String
RetrieveSharePointData

Input:

  • Query: Microsoft.Xrm.Sdk.Query.QueryBase
  • SiteUrl: System.String
  • DocumentLocation: System.String
  • ReferencedEntity: System.String
  • PageToken: System.String

Output:

  • BusinessEntityCollection: System.Object
RetrieveSharePointGlobalSettings

Input:

Output:

  • SharePointGlobalSetting: System.String
RetrieveTenantInfo

Input:

Output:

  • TenantInfo: System.String
RetrieveTrendingDocuments

Input:

  • Query: Microsoft.Xrm.Sdk.Query.QueryBase
  • SharePointSiteUrl: System.String

Output:

  • BusinessEntityCollection: System.Object
RetrieveUserDefaultCurrency

Input:

Output:

  • Currency: Microsoft.Xrm.Sdk.EntityReference
RetrieveValidSLA

Input:

  • RecordTypeName: System.String
  • RecordId: System.Guid

Output:

  • BusinessEntity: System.Object
RetrieveWallByView

Input:

  • View: Microsoft.Xrm.Sdk.EntityReference
  • PagingCookie: System.String
  • PageNumber: System.Int32
  • PageSize: System.Int32
  • CommentsPerPost: System.Int32
  • Source: Microsoft.Xrm.Sdk.OptionSetValue

Output:

  • EntityCollection: Microsoft.Xrm.Sdk.EntityCollection
RollupForActivityWall

Input:

  • Target: Microsoft.Xrm.Sdk.EntityReference
  • Query: Microsoft.Xrm.Sdk.Query.QueryBase
  • RollupType: Microsoft.Crm.Sdk.Messages.RollupType

Output:

  • EntityCollection: Microsoft.Xrm.Sdk.EntityCollection
SaveEntityGroupConfiguration

Input:

  • EntityGroupName: System.String
  • EntityGroupConfiguration: Microsoft.Xrm.Sdk.QuickFindConfigurationCollection

Output:

ScheduleBuildTopicModel

Input:

  • TopicModelId: System.Guid
  • ScheduleBuildStartTime: System.DateTime
  • ScheduleBuildRecurrence: System.String

Output:

SearchDocument

Input:

  • RegardingObjectType: System.Int32
  • RegardingObjectId: System.String
  • DocumentId: System.String

Output:

  • SearchLocation: System.String
  • DocumentLocation: System.String
SearchSharePointDocument

Input:

  • SiteUrl: System.String
  • DocumentLocation: System.String
  • ReferencedEntity: System.String
  • GetSharedDocumentsKeyword: System.Boolean

Output:

  • SearchLocation: System.String
SetActionCardState

Input:

  • ActionCardId: System.Guid
  • ActionState: Microsoft.Xrm.Sdk.OptionSetValue
  • MessageId: System.String

Output:

SetDevErrors

Input:

  • UserId: System.Guid
  • OrganizationId: System.Guid
  • Value: System.Boolean

Output:

SetOptionalFeatureStatus

Input:

  • Name: System.String
  • NewStatus: System.Boolean

Output:

SetPrimaryClientSubscriptionClients

Input:

  • ClientId: System.Guid

Output:

SetStateAzureServiceConnection

Input:

  • EntityMoniker: Microsoft.Xrm.Sdk.EntityReference
  • State: System.Int32
  • Status: System.Int32
  • CascadeModelState: System.Boolean

Output:

SetWordTemplate

Input:

  • Target: Microsoft.Xrm.Sdk.EntityReference
  • SelectedTemplate: Microsoft.Xrm.Sdk.EntityReference

Output:

ShouldDisplaySLALimitNotification

Input:

  • RegardingObjectTypeCode: System.Int32

Output:

  • Result: System.Boolean
SnoozeActionCard

Input:

  • ActionCardId: System.Guid

Output:

StartRIProvisioning

Input:

  • HubName: System.String
  • PrimaryKey: System.String

Output:

StatusUpdateBulkOperation

Input:

  • BulkOperationId: System.Guid
  • FailureCount: System.Int32
  • SuccessCount: System.Int32

Output:

TestAzureServiceConnection

Input:

  • AzureServiceConnectionId: System.Guid

Output:

TestTopicModel

Input:

  • TopicModelId: System.Guid
  • ConfigurationUsedId: System.Guid
  • MaxTopics: System.Int32

Output:

ToggleGuidedHelp

Input:

  • Value: System.Boolean

Output:

ToggleGuidedHelp

Input:

  • Value: System.Boolean

Output:

TrackEmail

Input:

  • ExchangeItemId: System.String
  • Regarding: Microsoft.Xrm.Sdk.EntityReference

Output:

UnfollowEmailAttachment

Input:

  • ActivityMimeAttachmentId: System.Guid

Output:

UnregisterSolution

Input:

  • PluginAssemblyId: System.Guid

Output:

UpdateDelveActionStatus

Input:

  • MessageId: System.String
  • ActionState: System.Int32
  • RecordId: System.String

Output:

UpdateDocumentManagementSettings

Input:

  • SiteCollection: System.String
  • FolderStructureEntity: System.Int32
  • EntityDocMgmtXml: System.String
  • ValidateStatus: System.Int32
  • ValidateStatusReason: System.Int32

Output:

UpdateFromTemplate

Input:

  • ReportId: System.Guid
  • WizardXml: System.String
  • IsOrgReport: System.Boolean

Output:

UpdateGlobalSharePointSettings

Input:

  • SharePointRealm: System.String
  • IsSharePointOnline: System.Boolean
  • UseAuthorizationServer: System.Boolean

Output:

UpdateRITenantInfo

Input:

  • HubName: System.String
  • PrimaryKey: System.String

Output:

UpdateSchedule

Input:

  • ReportId: System.Guid
  • ScheduleXml: System.String
  • ParameterXml: System.String
  • ScheduledReportName: System.String

Output:

UpdateYammerProperties

Input:

  • BusinessEntity: Microsoft.Xrm.Sdk.Entity

Output:

UpgradeToS2S

Input:

Output:

UploadDocument

Input:

  • Content: System.Byte[]
  • Entity: Microsoft.Xrm.Sdk.Entity
  • OverwriteExisting: System.Boolean

Output:

UploadSharePointDocument

Input:

  • DocumentContent: System.String
  • FileName: System.String
  • OverwriteExisting: System.Boolean
  • SiteUrl: System.String
  • DocumentLocation: System.String
  • ReferencedEntity: System.String

Output:

  • EditLink: System.String
ValidateAppModule

Input:

  • AppModuleId: System.Guid

Output:

  • AppModuleValidation: Microsoft.Crm.Sdk.Messages.AppModuleValidationResponse
ValidateOfficeGraphAuthentication

Input:

Output:

  • ValidationResult: System.String
ValidateSharePointFolder

Input:

  • FolderUrls: System.String[]
  • SiteUrls: System.String[]

Output:

  • ValidationStatus: System.Boolean[]
ValidateSharePointSite

Input:

  • SiteUrls: System.String[]

Output:

  • ValidationStatus: System.Boolean[]
  • ValidationLog: System.String
ValidateUrl

Input:

  • SharePointUrls: System.String

Output:

  • UrlValidationResult: System.String
VerifyProcessStateData

Input:

  • Target: Microsoft.Xrm.Sdk.EntityReference
  • ProcessState: System.String

Output:

  • IsValid: System.Boolean

How to create an activity attachment using WebApi in Dynamics 365

Very short post today – just wanted to share with you a piece of code which you can use to create an attachment for any activity in Dynamics 365. This is different from normal attachments, because you are not doing this by adding Annotation, rather ActivityMimeAttachment object. It’s important to remember that when you are migrating data – moving only Annotations will not transfer all Email or Appointments attachments to the new system!

Query Builder Error when exporting solution in Dynamics 365

Solutions in Dynamics 365 are very useful and there is no doubt about that. One of the latest features is possibility to add single fields, views or forms to the solution, not the whole entity with all its dependencies. That allows us to better control what is transferred and deployed on out staging and production environments. Few times I came across the problem, which is caused clearly by this granularity of solutions:

error

Query Builder Error

The specified field does not exist in Microsoft Dynamics 365

Fortunately this error was in on-premise environment, so I was able to check the tracing logs and the problem has become clear:

“attribute with id=’86e616c0-64fc-413c-9957-470272c3f198′ does not exist”

So, apparently, someone has removed some attribute from the system, but somehow it was orphaned in our solution and is causing the export to fail (no doubt – we are trying to export the solution, so system is getting all the metadata, for all the Solution Components and cannot find one of the component). This is very unfortunate, because we cannot see this missing object in the solution view, it’s only in database in SolutionComponentBase table.  In on-premise environment, it’s not a problem – we simply check the id in traces and then go to our database and do:

SELECT FROM SolutionComponentBase  where ObjectId = ‘guid of missing component’

This will get us the failing components from all our solutions. We can remove them on DB level (sic!) but if you are afraid that this is not supported (which it is, but really cannot break anything) you can do it using SDK.

But what if we have online instance without access to the database? We can request Microsoft Support for the traces and then we will know which attribute is failing. But if we are in a hurry, we would have to loop through all Solution Components is our solution, check if it exists in the system and remove it from the solution. I believe that in 99% of cases, the missing component would be an attribute, so here is the code that would help you to get rid of this error:

It simply iterates through all attributes in the solution and tries to retrieve metadata for each one of them. If it fails, it simply removes this component from the solution. That should be enough for most of the cases, but if there will be any other component types missing, you will have to modify the code to check for those missing components (which I described in one of my previous posts). I have prepared a very simple program, that iterates through all of the solution components and tries to retrieve every single type – and if it fails it just removes it from the solution. Feel free to use it for any means necessary:

https://github.com/pawelgradecki/SolutionExportFixer

Dynamics 365 – Create SharePoint folders without GUID

If you have ever come across the problem that Dynamics CRM out-of-the-box documents integration creates SharePoint folders with GUID appended to the record name, you probably wonder if this can be disabled in a supported way. The answer is – yes it can, but you cannot do it using CRM Web Interface. Instead, it can be achieved by using the tool OrgDBOrgSettings which is available alongside all other Dynamics 365 related downloads. Firstly, go to the:

https://www.microsoft.com/download/details.aspx?id=55117

Scroll down and choose CRM2016-Tools-KBXXXXXXX-ENU-amd64.exe. After downloading the tool, extract it to some folder and open Microsoft.Crm.SE.OrgDBOrgSettingsTool.exe.config file. Inside you will have to provide some authentication details – most likely you are not connecting to CRM 4.0, so you can skip OrgDBOrgSettingsTool_CrmService_CrmService, but you should fill:

After you filled in all this information, you can simply run the tool the following way:

 Microsoft.Crm.SE.OrgDBOrgSettingsTool.exe Retrieve [/u] <OrgName>

Which (after providing the password) will give you all the settings for the orgname (/u specifies if this is unique name of the organization or friendly name), so for example:

Microsoft.Crm.SE.OrgDBOrgSettingsTool.exe Retrieve /u orgname

settings

If you want to update some setting you can run:

Microsoft.Crm.SE.OrgDBOrgSettingsTool.exe Update [/u] <OrgName> <SettingName> <Value>

All the settings, with allowed values, are listed here:

https://support.microsoft.com/en-us/help/2691237/orgdborgsettings-tool-for-microsoft-dynamics-crm

I advise every admin/customizer to look through this options, as some of them can completely change the behaviour of CRM.

Back to our initial problem – if we would like to disable appending the GUID after the name of the record, we just have to run:

Microsoft.Crm.SE.OrgDBOrgSettingsTool.exe Update /u onedynamics  CreateSPFoldersUsingNameandGuid False

And now all the folders created by Dynamics 365 in SharePoint will not have this ugly GUID after the name of the record (of course you should remember not to have duplicated names for your entity records, otherwise you are asking for trouble).

Making use of transactions in Dynamics 365 Customer Engagement

I believe that if you have ever written a CRM plugin, you are aware of the event execution pipeline (https://msdn.microsoft.com/en-us/library/gg327941.aspx) and that the operation is run in transaction which means that if there will be any exception, the whole transaction will be rolled back. Pre-operation plugins and Post-Operation plugins are also run in transaction, so if there will be an exception raised by the plugin, changes will not be reflected in CRM. This includes not only chaning attributes for the entity that the plugin is running on – create/update/delete changes on any other entities are also rolled back. This is really convenient – we can perform a bunch of operations and we are sure that even if anything goes wrong during Post-Operation, everything will be changed back to the original state.

The usage of transactions can be embraced even more by using custom Actions and ExecuteTransactionRequest. Custom  Actions can also be run with a rollback option (which can be enabled or disabled on Action configuration page). ExecuteTransactionRequest allows to group different OrganizationRequests and send them in bulk to the server – they will be run in single transaction.

Ok, but how this transactional behaviour works in real world? To make it easier to understand for you I created a custom entity “new_lock” and prepared a very simple CRM plugin:

public void Execute(IServiceProvider serviceProvider)
{
    var factory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
    var service = factory.CreateOrganizationService(null);
    var @lock = new Entity("new_lock");
    @lock.Id = new Guid("590424F1-611F-E711-80D2-00155D010402");
    @lock["new_name"] = "lockme";
    service.Update(@lock);
    Thread.Sleep(30 * 1000);
}

I registered this plugin on Create message of the Contact entity. As you can see it simply retrieves the “new_lock” record and updates its name to some different value and then waits 30 seconds. Let’s open this record in a browser:

Now, let’s create a Contact (using a different browser window). After clicking “Save” you will notice that the loader starts but the data is not getting saved. That’s ok because our plugin is running in the background and it takes about 30 seconds to finish. If you try to save the opened “new_lock” record with some different name, you will notice that… you can’t do this:

This is the principal idea of transactions – by creating a Contact we opened a transaction and “locked” the “new_lock” record by updating it. Before the transaction is finished nothing can write to this record. After 30 seconds, our contact is created and the “new_lock” is updated with the new value. Is this a value from the plugin or from what we have entered on the form? Well it’s the second option, because we updated the value after the transaction has done it (it does not matter that it waited 30 seconds after that).

How can we make use of that transactional behaviour of CRM? I believe that a very cool feature that we can develop is proper auto-numbering. It’s pretty well known problem which is usually handled by some custom counter entity. The algorithm usually works like that:

  1. Run plugin on create of numbered entity
  2. Retrieve Counter
  3. Assign current value of counter to entity record
  4. Update counter with the next value
  5. Plugin ends

If you don’t have many users or some custom apps creating entities, you will probably never run into any concurrency problems. But imagine what will happen if you have two concurrent calls and both retrieved value of the counter before point 3 was fulfiled. This means that both records will have the same number and counter will be increased only by 1. Some may say – ok let’s use standard locking, we can have a static object to lock on and before plugin starts it’s core logic, the running thread must obtain the lock. That would work flawlessly on single-frontend-server environments. But what happens if there are more application servers for CRM? You cannot synchronize threads between different servers…

Knowing what we already know about transactions, we can easily modify this scenario to:

  1. Run plugin on create of numbered entity
  2. Retrieve Counter
  3. Update some dummy counter property to some dummy value (here we will lock the counter for usage only for this transaction)
  4. Retrieve Counter (now we are sure nobody will modify its value)
  5. Assign current value of counter to entity record
  6. Update counter with the next value
  7. Plugin ends (and any concurrent operations start from point 3)

This should work even on multi-server environments, because the transactions are locked on database level. Very simplified code (so pardon the style) can look like this:

public class TransactionPlugin : IPlugin
{
    public void Execute(IServiceProvider serviceProvider)
    {
        var context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
        var factory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
        var service = factory.CreateOrganizationService(null);

        var counter = GetCounter(service);
        counter["new_name"] = "lockme";
        service.Update(counter);

        //now counter is locked

        //we have to get it again to prevent race conditions
        counter = GetCounter(service);

        var target = (Entity)context.InputParameters["Target"];
        target["new_number"] = counter["new_nextnumber"];

        counter["new_nextnumber"] = (int)counter["new_nextnumber"] + 1;
        service.Update(counter);
        //after finishing the transaction, concurrent executes can go on from the lock
    }

    private Entity GetCounter(IOrganizationService service)
    {
        //return some counter
    }
}

 

UPDATE 21.07.2017

I prepared more detailed code for autonumbering plugin, which I have successfully used in my projects. The plugin works on Pre-Create of Account.

As you can see I’m retrieving my “new_lock” entity by its name using QueryExpression and after locking it with Update, I’m retrieving it again using Retrieve message. It is very important, because the following code will not work correctly:

If you try to run that, you will discover that you have a lot of duplicates. The reason is that the second RetrieveMultiple gets exactly the same value as the first one, so if we already obtained counter and some other thread will modify its value – this change will be not reflected. This is very important, so make sure you are not falling for this trap – for me this feature is quite surprising, QueryExpression results seem to be cached somehow in plugin context. What is even more interesting the following version will work flawlessly:

So simply replacing service.RetrieveMultiple with RetrieveMultipleRequest causes the results to be retrieved from the database, not from some kind of cache. That is something you should probably be aware of when implementing your own solution.