Skip to main content

Posts

Showing posts from 2016

Dynamics 365 online and Adx portal on-premise. Are they compatible?

     Adxstudio portals became a part of Dynamics 365. It is definitely a great news and a first step in the long way.   Dynamics 365 on-line has an amazing set of features that really seduce customers to move to cloud.    Dynamics 365 on-line has option to enable a Portal Add-On. It will install a  8.x   portal in crm instance and allow you select from a list of available pre-build solutions like Customer portal, Partner portal etc. The platform has limitations related to portal customization, development, custom coding. Hard to say how long will take to MS and ex-Adx team to provide users with the same level of flexibility and development features as they use to have on premise. In the same time, customers are looking for work arounds to combine Dynamics 365 on-line with on premise portals. This article describes such integration. Adx and MS still provide support for on premise portals of versions 7.0.0018-23. ! Please mind that Adxstudio and Microsoft officially do not su

Crm solution generic issue: The import of solution failed

     Dynamics crm 2016 gave us a revolutionary option to work with solutions more granularly, option for true inheritance from managed solutions, build-in holding solution option etc.       In the same time some old “diseases” are still there. Managing dev and QA instances, I’ve found an issue that appears as a generic error in log file and cannot be tracked with tracer or event viewer. By my experience, the issue may happen if: 1.        You deleted a relationship and then created a field with same name in the same entity. 2.        You deleted a local option set field and created a  field based on global option set in the same entity with the same name.         The symptom of those two issues will appear in the target crm instance in the import log file: “ The content of the import file is not valid. You must select a text file ”. The fix is to make manual changes to target. In case you cannot make manual changes due to managed nature of target solution you might

Dynamics CRM Product. Plugin strategy.

Plugin strategy. Managed Steps Concept.           Most of modern products (managed solutions) for Dynamics crm, those we import into our environments, have some ways to be configured. By creating “setting” entity, Azure configuration for marketing solutions, changing templates or workflows. If we deal with off-line then workflow is not an option any more, but plugins are. In case of plugin we deal with hardly configurable component and have not many options to work around. Disable step, use unsecure/secure configuration (if vendor gives us such option), ask vendor for patch. This sort of workarounds.           Managed Steps Concept is an approach for dynamics crm plugins architecting and coding. Vendors can utilize it to improve products maintenance and make it more client friendly.           The proposed design is useful for any organization making products for Dynamics Crm (no version limitations). This approach is also good for fast fixes/reconfiguration in projects. Level o

Refresh CRM 2016 Form after record save using JavaScript

      I had a need to refresh crm 2016 form right after initial save. Surprisingly all good old solution from my archive were not effective in crm 2016. Neither window.location.reload(), nor sdk’s refresh, nor trivial setTimeout. "setTimeout" would work if not bunch of heavy plugins and JavaScrippt validation on save event.     I found that Google knows about it as many as I do. Okay, no copy past this time J     After half an hour I found a nice solution with really minimal risk of browser leaking. The idea based on fact that OnLoad event occurs without form refresh right after change of form type. We need an independent flag to catch that. The code below does the trick. function refreshFormAfterInitialSave() { if (Xrm.Page.ui.getFormType() == 1) { top.callN = 1; } if (Xrm.Page.ui.getFormType() == 2 && top.callN == 1) { setTimeout(function () { top.callN = null; Xrm.Utility.openEnti

Adx portal: Improve JavaScript Upload Experience

     While using "Custom Javascript" area in Web pages, Web Form Steps etc. I found it a little bit uncomfortable in use.      The max length of 10 000 characters not always enough and if I add a compiled content then debugging is blocked.      I ended up creating dynamic script loader. It picks up a url (like "~/Areas/FolderName/scriptName.min.js") from “Custom Javascript" area. Then script checks if such a namespace exists and object is loaded. If necessary, it loads the script. The idea is very simple. Have an object loaded with master page to load JavaScript and CSS files: if (typeof (gHelper) == "undefined") { gHelper = { __namespace: true }; } gHelper.data = { addedFiles: "", } gHelper.fn = (function (window, document) { function loadfile(filepath, filetype) { var fileref; // JavaScript file from solution if (filetype == "js&q

Dynamics Crm portals review

   In this post I’m not going to compare modern MS Dynamics Crm portals but two main models which vendors use to create their products. First one we’re going to call “crm data driven” model and let’s name another one “crm loosely coupling”. Data Driven model (DDM)         Data Driven model (DDM) means that frontend pages, views and controls replicate the crm forms and respect most of crm filters and validations. DDM dictates vendor develop a platform to reflect crm architecture and rules on the front end.       Vendor’s platform can provide additional enhancement inside portal and crm. It can be frontend content management system CMS, pre-installed solutions for better web engagement experience, deployment tools, ALM kits, portal plugins, service workflow etc.       The main benefit of the DDM is ability to manage portal design and create simple business flows without writing code. It’s a true for simple pages but for complex projects it doesn’t work.        A significant

Crm Service Impersonation: Shared Views Management

  Here is a note about an interesting project involving crm service impersonation . Client had an idea to allow users subscribe to the only views they need and unsubscribe from extra views freely.    Only view owner can share its views. The main issue here to give to user ability to share somebody’s views as the view owner without extending his security privileges.   The project had a number of custom controls and entities. Here I’m going to describe only the security workaround by using a service impersonation. Here is a “how to”, a very good example of service impersonation:    The plugin can be registered on “Calling User”. The minimum permission your customers will need is “Read Access” to “UserQuery” entity. All OOB roles have it.   First step : Get view owner .   Given you have a User Query id. I'm getting it from one of custom entities. //get query owner Entity userQuery = service.Retrieve( "userquery" , userQueryId, new ColumnSet ( new s