Virtual Entity with localhost OData service - dynamics-crm

I tried to create virtual entity with OData v4 data source.
This guide worked for me with no problems: https://learn.microsoft.com/en-us/archive/blogs/lystavlen/virtual-entities
Now I'm trying to create virtual entity with OData v4 data source which is located on localhost. The mappings for the entity and entity fields are done correct.
So, when I open my virtual entity list I got this error:
Entity could not be retrieved from data source. Please try again or contact your system administrator.
In Plug-In Trace Log in the newly created record the Exception Details says:
Unhandled Exception: Microsoft.Xrm.Sdk.Data.Exceptions.GenericDataAccessException: An OData error occurred.
at Microsoft.Xrm.DataProvider.Odata.V4.Plugins.Client.ExceptionTranslationEdmModelLoader.GetModel(ODataDataSource info, IDictionary2 httpHeaders) at Microsoft.Xrm.DataProvider.Odata.V4.Plugins.Metadata.ODataMetadataContextFactory.CreateCachedData(ODataDataSource dataSourceInfo, Guid organizationId, IDictionary2 httpHeaders)
As I know, in Dynamics 365 there is no requirements for OData services (which are data source for Virtual Entities) to be located not in localhost.
Am I missing something? Or there is a way to make it work with localhost OData service?

Related

Could not register pre-delete validatation plugin step for the Team entity in MS Dynamics CRM 2011

I want to add validation before Team entity deletion. In order to do that, I need to add Pre-validation plugin step for the Delete message and Team entity.
Nevertheless, when I'm trying to do it via the Plugin Registration Tool, I'm getting an error:
Invalid Entity Name
Invalid Primary Entity or Secondary Entity specified. Please re-enter the data.
Here is the data I'm filling in the Register New Step:
Message: Delete
Primary Entity: team
Secondary Entity: none
Run in User's Context: Calling User
Execution Order: 1
Eventing Pipeline Stage of Execution: Pre-validation
Execution Mode: Synchronous
Deployment: Server
I'm using Microsoft Dynamics CRM 2011.
I could not find any explanation for that. What I'm asking is:
What is the reason for that?
What is the intended way of applying custom validations during the deletion of the Team entity?
That's because Delete Message for Team Entity in CRM 2011 is not supported
Whereas when you look for CRM 2016 and above Team Entity does support delete Message
Summary: CRM 2011 Team Entity does not support Delete Message
It is possible to enable registering the plug-in by updating the corresponding SdkMessageFilterBase record.
Connect to your DB server.
Navigate to your %ORGANIZATION_NAME%_MSCRM DB.
Run the script:
SELECT
[dbo].[SdkMessageFilterBase].[PrimaryObjectTypeCode],
[dbo].[SdkMessageFilterBase].[CustomizationLevel],
[dbo].[SdkMessageFilterBase].[SecondaryObjectTypeCode],
[dbo].[SdkMessageFilterBase].[IsCustomProcessingStepAllowed],
[dbo].[SdkMessageFilterBase].[Availability],
[dbo].[SdkMessageFilterBase].[SdkMessageId],
[dbo].[SdkMessageFilterBase].[IsVisible]
FROM
[dbo].[SdkMessageFilterBase]
INNER JOIN [dbo].[SdkMessageBase]
ON [dbo].[SdkMessageFilterBase].[SdkMessageId] = [dbo].[SdkMessageBase].[SdkMessageId]
WHERE
[dbo].[SdkMessageBase].[Name] = 'Delete' AND
[dbo].[SdkMessageFilterBase].[PrimaryObjectTypeCode] = 9 -- Team entity code is 9
Check the result. If IsCustomProcessingStepAllowed field is set to 0, it is preventing you from registering the plug-in step.
Update IsCustomProcessingStepAllowed to 1 to be able to register custom plug-in step.
This solution worked for me.
Articles describing such solution:
Enabling plug-in for Change Business Unit and Change Manager for systemuser entity

Business Central Dynamics 365 Sales Connection Setup Error in Sync Queues for Item, Opportunity, Resource and Others

I am working on Business Central on a demo tenant. I have set up Common Data Service Connection Setup and Dynamics 365 Sales Connection Setup. When I run a initial sync in a new company made with production - setup data only the Customer, Contact, Currency and Vendor Entities sync job are being run and finished successfully(so it is written in status of the wizard and I can find new account in CRM which were previously created in Business Central). Before running the sync I removed the CRM Customer Engagement licence from the integration user and set him up in CRM as a non-interactive type of user.
The error I receive from the Item, Opportunity and Resource entity are the following:
Open record "An error occurred when communicating with Common Data
Service. Detailed description: 'Product' entity doesn't contain
attribute with Name = 'bcbi_companyid' and NameMapping = 'Logical'.
MetadataCacheDetails: ProviderType=Dynamic, StandardCache=Tru"
Open record "An error occurred when communicating with Common Data
Service. Detailed description: 'Opportunity' entity doesn't contain
attribute with Name = 'bcbi_companyid' and NameMapping = 'Logical'.
MetadataCacheDetails: ProviderType=Dynamic, StandardCache"
Open record "An error occurred when communicating with Common Data
Service. Detailed description: 'Product' entity doesn't contain
attribute with Name = 'bcbi_companyid' and NameMapping = 'Logical'.
MetadataCacheDetails: ProviderType=Dynamic, StandardCache=Tru"
Other entities in initial sync are not run and i believe that the sync stopped on those errors. I cannot finish the initial sync. After returning the licence and trying again to run the error remains and the sync is not finished. Am I missing a company property somewhere ?

Dynamics CRM Metadata not refreshing in Tibco Scribe

I created a new custom entity, but it is not showing up in entity list of lookup block.
Connection is created successfully, but the latest customization are not pulled I guess. I waited for a day though.
What should I do to see a new custom entity in the list from lookup block of Maps?
On Tibco (Scribe) when you connect Dynamics crm enviornemnt, under Connection, there is small gear (settings) setting gear you can reset metadata, clicking it shall refresh your metadata.
Please see below Image for Refrence.

Specific record retrieval in Virtual Entity Dynamics 365

I tried to set up virtual entity and yes I am able to show the record in CRM. But, I am not to open a specific record to see its details on form.. Even in Web API we are handling single result method also, but not sure where we are missing. Please do the helpful on the same...
Prior posting the question here I was using a constructor for single retrieve like public SingleResult Get([FromODataUri] Guid key). Now I have changed that to public Person Get(Guid key) and it's working fine.

The remote server returned an error: (409) Conflict

While trying to register a bot in Microsoft Bot Framework, I am getting the following error message :
The remote server returned an error: (409) Conflict.
The messaging endpoint is of the form :
https://your_bots_hostname/api/messages
The bot is hosted in azure.
I got the same Error during the registration of a bot in Microsoft Bot Framework. Mostly the above error occurs whenever we are trying to create a new bot, in that registration we are specified the Existing Microsoft Application Id in the Microsoft Application Id field of bot registration form.
So, try to create new Microsoft Application with new name (like that the name would never use before) for your new bot then your issue resolve.
-Hope it will be help to you.
-Kishore

Resources