Category: Blog

Blog, Development

Cancelling save based on the result of async operation

This post is similar to previous one related to showing/hiding of the button based on the result of async operation but in this scenario script allows/disallows form to be saved. In my case I check if there is any account with the same “Account Number” available already and if there is script blocks the save. …

Blog, Development

Showing ribbon button based on the result of async operation

Earlier when I had a task to show/hide button based on the result of data-retrieval operation I used following approach – declared variable, made synchronous call to endpoint, set that variable inside the callback and returned true/false result at the end of validation function. It worked but if the operation was long-running it caused blocking …

Blog, Development, Howto

Pass DateTime parameters to set field record values

Today I got requirement to open new record form with prepopulated DateTime field. This article describes how to pre-set Date field: The following sample sets the Est. Close Date field for a new opportunity to January 31, 2011. The unencoded value for the extraqs parameter is “estimatedclosedate=01/31/11”. No single word about time component. Luckily I …

Blog, Development

How to make 9.0 Classic Client a bit cleaner

At the moment I do migration for one of customers from 8.2 ground to 9.0 cloud. I migrated all the customizations and customer was not satisfied with layout of updated classic 9.0 client. The biggest complain was related to huge whitespaces around fields. Just compare the same default forms of account entity 8.2 on the …

Blog, Development, Howto

How to share record with user using WebApi

You can use following code to share record (account in this case) with user (but you can share it with team as well) using JavaScript and WebApi without any additional development:

 

Blog, Development, Howto

How to call QuerySchedule using WebApi

Following code can be used to call QuerySchedule function using WebApi:

 

Blog, Development, Howto

How to Add Item to Campaign using WebApi

Following JS (with small changes) can be used to add Marketing List/Product/Sales Literature to Campaign:

 

Blog, CRM Extensions, Ultimate Workflow Toolkit

UWT: Email Invoice in PDF format

It became a typical scenario – Email Quote or Invoice to customer in PDF format. When you’re on premise – it’s not a big problem – develop report, publish it to CRM, publish it to Reporting Services and use Reporting Services to render report in PDF format. But what to do when you’re online? One …

Blog, Tools, Ultimate Workflow Toolkit

UWT: Cloning record with related records with no code

After I wrote previous post regarding copying of N-N related records I got reasonable question – why have I used Action in this scenario if it is possible to implement it without it using just “Distribute Workflow” step and On-Demand workflow. I agreed that this is possible. So here is other scenario that can’t be …

Blog, Development, Howto

How to generate Excel Template from code

2 years ago as a part of Dynamics CRM 2016 release Microsoft introduced “Word/Excel Document Templates”. I saw examples how to generate Word template but have never seen the same example for Excel. Here is what I found after several hours spent with DB of CRM and ILSpy:

Huge limitation of this code – …