Category: Howto

Blog, Development, Howto

How to get type of the instance (production/sandbox/something else) using code

I was working on the plugin where logic had to work differently depending on the type of the instance, i.e. if code is executed in Sandbox environment – do A, if code is executed in Production – do B. I never developed anything similar before and search engines did not bring anything valuable. After research …

Blog, Development, Howto

JS: How to get the originating record reference in the form script of the Quick Create Form

Just imagine that you need to define the context in which “Quick Create Form” was opened and depending on the context – to do some additional operations. In this short post I provide supported code you can use to define it.

Blog, Development, Howto

HowTo: Show ribbon button depending on Application running

Several days back I saw an email from Steve Mordue MVP asking if it is possible to filter ribbon elements based on application like it’s implemented for entities, views and forms. Answer was that at the moment there is no easy way to do it. In this post I will help Steve to resolve his …

Blog, Howto, Ultimate Workflow Toolkit

HowTo send record Url pointing to specific Model Driven Apps

Model Driven Apps were released as a part of 8.2 release (and were called just Apps that time). It’s really cool feature that allows you to build role-tailored applications that have functionality required for specific role. What is available through UI unfortunately is not available through workflows – there is no possibility to define specific …

Blog, Development, Howto

HowTo: open plugin/custom workflow activity project created using CRM/D365 Developer Toolkit

I have to confess that I used to use CRM Developer Toolkit (CRMDT) before Jason Lattimer’s VS extensions were released. After I uninstalled CRMDT I started to experience issues opening projects created using it. Following error message appeared when I tried to open a solution: Here is how it can be easily fixed:

Blog, Customization, Howto

Enable plus button for subgrids on disabled forms

Several weeks ago I got a question from my customer – when record is inactive it’s not possible to add associated records from subgrids located on entity form – is it possible to bring back “plus” button to the subgrid even if record is deactivated?

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, 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: