In this blog, we'll see how to create custom API in maker portal and write plugin to implement it. We'll take the example of refreshing roll up field on demand. This API will take 3 parameters: TargetEntity: Name of the entity containing the roll up fieldTargetId: GUID of the record Field: Name of the roll … Continue reading Dataverse: Create Custom API and Implement using plugin C#
Category: .Net
Azure: Schedule Azure Function in local time zone
Recently, we were working on Timer triggered Azure functions. One of them was required to run at 2AM Australia time(UTC+10). Azure Function uses 6 value CRON expression {second} {minute} {hour} {day} {month} {day-of-week}, not the regular one with 5 values. So, we set the azure function timer with CRON expression "0 0 2 * * … Continue reading Azure: Schedule Azure Function in local time zone
D365: Post custom message to Session Enabled Service Bus Queue C#
In one of my previous posts, https://ajitpatra.com/2019/12/09/d365-post-custom-message-to-azure-service-bus-queue-c/, we had gone through how to post custom message to a service bus queue. In this post, we'll see how we can post the same message to a session enabled queue. We have to make few lines of code changes in PostMessageToServiceBusQueue method of this post as shown … Continue reading D365: Post custom message to Session Enabled Service Bus Queue C#
Using Service Bus Triggered Azure Durable Function with D365 CE
In this post, we'll see how we can use Service Bus triggered Azure Durable Function with D365 CE to perform CRUD operation. Requirement: When Rate Amount(custom field) field changes in Rate(custom entity) record, update Rate(custom field) field on related(Revenue Schedule Line(custom entity)) records of the corresponding Rate record. Of course, there are multiple ways to … Continue reading Using Service Bus Triggered Azure Durable Function with D365 CE
D365: Service Bus Triggered Function Error: Cannot bind parameter ‘parameterName’ to type MessageReceiver. Make sure the parameter Type is supported by the binding
Recently, we were working on Service Bus Triggered Azure Durable Function. After writing the necessary code, we deployed the Durable Function to Azure. After deploying, while trying to test the function, we faced one weird issue saying "Error: Microsoft.Azure.WebJobs.Host: Error indexing method 'AzureFunctionName'. Microsoft.Azure.WebJobs.Host: Cannot bind parameter 'parameterName' to type MessageReceiver. Make sure the parameter … Continue reading D365: Service Bus Triggered Function Error: Cannot bind parameter ‘parameterName’ to type MessageReceiver. Make sure the parameter Type is supported by the binding
D365: Service Bus Triggered Function error: Connection string ‘AzureWebJobsServiceBus’ is missing or empty
Recently, while working on Service Bus triggered Azure Durable Function, we got an error saying "The function runtime is unable to start. Microsoft.Azure.WebJobs.ServiceBus: Microsoft Azure WebJobs SDK ServiceBus connection string 'AzureWebJobsServiceBus' is missing or empty". Below is the code that we were using: [FunctionName("UpdateGlobalRatesOnRSLs")] public static async Task Run([ServiceBusTrigger("%QueueName%")] Message message, MessageReceiver messageReceiver, string lockToken, … Continue reading D365: Service Bus Triggered Function error: Connection string ‘AzureWebJobsServiceBus’ is missing or empty
D365: “Access denied. You do not have permission to perform this action or access this resource” while calling SharePoint API from plugin/custom workflow
Recently, we were working on calling SharePoint API from plugin. While getting the access token we received the following error: "Access denied. You do not have permission to perform this action or access this resource". To fix this issue, we gave appropriate permission to the Application we had created in SharePoint for Server to Server … Continue reading D365: “Access denied. You do not have permission to perform this action or access this resource” while calling SharePoint API from plugin/custom workflow
D365: Call SharePoint API from plugin/custom workflow C# – Part 2
In the previous post, we saw how to create an app in SharePoint and give necessary permission. In this post, we'll see how to use the app details in C# to connect to SharePoint API. We can use the below code to get the access token: private static string TENANT_ID; private static string CLIENT_ID; private … Continue reading D365: Call SharePoint API from plugin/custom workflow C# – Part 2
D365: Call SharePoint API from plugin/custom workflow C# – Part 1
In this series of post, we'll see how we can call SharePoint API from plugin or custom workflow using C# to retrieve number of documents uploaded to SharePoint for a particular record, albeit we can do any other operation connecting to SharePoint API. To use SharePoint API, we need to create an Application in SharePoint … Continue reading D365: Call SharePoint API from plugin/custom workflow C# – Part 1
D365: Post custom message to Azure Service Bus Queue C#
In this post, we'll see how we can post custom message to Azure Service Bus Queue. Let's go to Azure portal and Create a Service Bus Namespace. Search for Service Bus Click Create Give a Name and Click on Create After creating Service Bus Namespace, Browse through it and go to Shared Access Policies. Click … Continue reading D365: Post custom message to Azure Service Bus Queue C#
D365: “The user is not a member of the organization” error while connecting to CE
Recently, we were working on connecting to CE to do some CRUD operation using Azure function. We were using Client ID(Application ID) and Client Secret of the app registered on Azure Active Directory. We had provided the necessary API(Dynamics CRM) Permission (delegated "user_impersonation") to the app. While running the Azure function, we were getting the … Continue reading D365: “The user is not a member of the organization” error while connecting to CE
D365: Azure Durable Function with D365 CE – Part 6
In the previous post, we saw how to invoke webhook using custom global action and passed plugin execution context to the webhook. In this last post of this series, we'll see how to execute custom global action from JS on form load. Using CRM Rest Builder, we can get the HttpRequest for executing action which … Continue reading D365: Azure Durable Function with D365 CE – Part 6
D365: Azure Durable Function with D365 CE – Part 5
In the previous post, we saw how we can register webhook for the azure durable function. In this post we'll see how we can use custom global action to invoke webhook and pass plugin execution context to the webhook. Let's go to D365 instance and create a global action as shown below: We have passed … Continue reading D365: Azure Durable Function with D365 CE – Part 5
D365: Azure Durable Function with D365 CE – Part 3
In the previous post, we saw how we can implement durable function for CRUD operation in D365 and test it using Postman. In this post we'll see how we can parameterize durable function so that we can pass parameters from external system to durable function and process it further. Let's take a simple example as … Continue reading D365: Azure Durable Function with D365 CE – Part 3
D365: Azure Durable Function with D365 CE – Part 2
In the previous post, we saw how we created the default template of durable function. In this post, we'll modify that to do some CRUD operation in D365 CE. For demo purpose, let's pick a simple scenario i.e. Retrieve related records(accommodation payments) of a particular Contact record and update their field(Expected Refund Due Date a … Continue reading D365: Azure Durable Function with D365 CE – Part 2
D365: Azure Durable Function with D365 CE – Part 1
In this series of post, we'll see how we can use Azure Durable function(an extension of Azure Function which works on durable task framework) with D365 CE. We can find more details about Durable functions, it's application patterns, pricing and the way it works here: https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview. This series of post is divided into 6 parts:Part … Continue reading D365: Azure Durable Function with D365 CE – Part 1
USD 4.1: Implementing Click to call functionality for making outgoing calls
In this post, we'll see how we can implement click to call functionality i.e. clicking on a phone number field on the form to make outgoing call inside USD. NOTE: In our scenario, we have implemented custom CTI adapter to use web services of telephony provider to make the outgoing calls. Below are the steps … Continue reading USD 4.1: Implementing Click to call functionality for making outgoing calls
D365: ExecuteMultiple error EntityState must be set to null, Created (for Create message) or Changed (for Update message)
While working on bulk update recently, we got an error saying "EntityState must be set to null, Created (for Create message) or Changed (for Update message)" in the ExecuteMultipleResponse object. We were trying to update one attribute of a set of records and below is the piece code we were using to do bulk update: … Continue reading D365: ExecuteMultiple error EntityState must be set to null, Created (for Create message) or Changed (for Update message)
D365: Value cannot be null. Parameter name: attributeName
Recently, while trying to retrieve records in D365 CE using LINQ, we got the following error message "Value cannot be null. Parameter name: attributeName". There was not much information in the stack trace as well. We were using below code to get records based on certain condition from 2 entities putting join as shown below: … Continue reading D365: Value cannot be null. Parameter name: attributeName
D365: Add business day(s) to specific date considering weekends and public holidays
Recently, we got a requirement to add business days/working days to specific date considering weekends and public holidays defined in CRM system and get the next working day. Below is the workdays and working hours defined in the CRM system: Fridays and Saturdays are considered as week off. Below are the list of holidays defined … Continue reading D365: Add business day(s) to specific date considering weekends and public holidays
VS 2015: The “Team Foundation Server Provider Package” package did not load correctly
After installing VS 2015 on my machine, when i was trying to connect to TFS from Team Explorer, i was getting the below error message: The "Team Foundation Server Provider Package" package did not load correctly. As mentioned in the error pop up, i had a look at the ActivityLog.xml file in the path mentioned … Continue reading VS 2015: The “Team Foundation Server Provider Package” package did not load correctly
“The application has failed to start because its side-by-side configuration is incorrect” error while running console app(.exe)
While running a console app(.exe) by double clicking on it, we faced a weird issue and the exe was not getting executed. We were getting below error message in a pop up window: "The application has failed to start because its side-by-side configuration is incorrect". While checking the event log, we found that there was … Continue reading “The application has failed to start because its side-by-side configuration is incorrect” error while running console app(.exe)