crmdialog

Process dialogs are deprecated and will be removed by December 1, 2020. Until that day. Did your company have replacement options? Replace dialogs Power Apps component framework Development of custom Html/JS Webresources with help of modern frameworks … With some keywords on Google: dynamics crm 365 cds dialog you found: The first post: Custom Dialog Boxes - Part 1 of Bob Guidinger. He wrote on: July 22, 2018 Then on July 29, 2018 he wrote second post: Custom Dialog Boxes - Part 2 [Read More]

View-FetchXML

You are a Dynamics 365/CDS developer. How you build your FetchXML string in JavaScript/C# code? Are you use the function: Download Fetch XML in the Advanced Find window? Wow, look like you have a lot of tasks :cold_sweat: after you Download Fetch XML Open the xml file with the text editor Find " and Replace with ’ Edit, join to make a correct string, also with a dynamic parameter ….. Instead click the button Download Fetch XML in the Advanced Find window, you can click the button View FetchXML near it by install the solution View-FetchXML [Read More]

Dynamics 365 Online S2S Authentication - Full Explain

Server-to-Server (S2S) authentication (only support Dynamics 365 online) was great, it use ClientId/SecretKey to authentication (instead use UserName/Password) and it use without Dynamics 365 license. But everybody have problem when use CllientId/SecretKey, the main problem is HTTP Error 401 - Unauthorized: Access is denied I headache this problem more than 3 days, and now, I succeed authentication with ClientId/SecretKey. This post I will fully explain you how I can achieve it. [Read More]

Please, don't hard code

When building hyperlinks to CRM in SSRS reports, please don’t hard code Wrong: hard coding your CRM URL. Do not set your URL to “https://crmserver/….” If you do this use the hyperlink will only work in one environment and will have to be rewritten to work in another environment. Right: Use the CRM_URL parameter in your report. This makes your links will work in all environments, even when offline. Parameters!CRM_URL Wrong: Using OTC (ObjectTypeCode) in your hyperlink expression. [Read More]

Get Sql ConnectionString from CRM server code

Sometime, your business logic need access direct SQL Server, and you want to know the ConnectionString of CRM Database. This code will help you get Sql ConnectionString from CRM Plugin/Custom Action/Custom Workflow (before that I saved the ConnectionString to the custom Options entity) public void Execute(IServiceProvider serviceProvider) { var context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext)); var platformContext = context.GetType().InvokeMember("PlatformContext", BindingFlags.GetProperty, null, context, null); var transaction = (SqlTransaction)platformContext.GetType().InvokeMember("SqlTransaction", BindingFlags.GetProperty, null, platformContext, null); throw new InvalidPluginExecutionException(transaction. [Read More]

Hide Next Stage, Set Active, Back Button in the Business Process Flows

I have a requirement in my current project that hide Next Stage, Set Active and Back button in the Business Process Flows To do that, I used an UnSupported code code below function hideBPFButton() { hideBPFButtons(); window.addEventListener("resize", hideBPFButtons); Xrm.Page.data.process.addOnStageSelected(hideBPFButtons); } function hideBPFButtons() { var dom = (Xrm == undefined || Xrm.Internal == undefined || Xrm.Internal.isTurboForm() == undefined || Xrm.Internal.isTurboForm() == false) ? document : parent.document; $("#stageSetActiveActionContainer", dom).remove(); $("#stageBackActionContainer", dom).remove(); $("#stageNavigateActionContainer", dom). [Read More]

Add more buttons on the form subgrid

Sometime, your business requirement need add some buttons in the form sub-grid like picture below (Account form, sub-grid Contacts). How I can do that 1. Prepare 2 web-resource png image 16x16 file. 1 for normal button 1 for hover button 2. Copy function below to your main js web-resource file. function createButton(grid, buttonName, buttonTooltip, buttonImage, buttonImageHover, callback) { if (grid == null || grid.length == 0) return; if (buttonName == null || buttonName. [Read More]