Free Open Source Dynamics 365 Photo Gallery: MMDPG for short


12th January 2019 update: The solution has been updated to work with Dynamics 365 v9.1


29th July 2018 update: The solution has been updated to work with Dynamics 365 v9


Many Microsoft Dynamics 365 projects require a photo gallery. About a year ago, I needed a free open source photo gallery to be embedded in Dynamics CRM custom and system entities to display photos attached to notes on any entity. After a lot of research, I only found “paid for” photo galleries and very little free open source Photo Gallery that can work with both Dynamics CRM Online and on-premise.

Hence, I decided to build my own Microsoft Dynamics 365 Photo Gallery and I’m now releasing it as another contribution to the Microsoft Dynamics community. The Dynamics 365 Photo Gallery utilises the open source FlexSlider photo gallery and the Dynamics CRM JavaScript libraries CRM Fetch Kit and XRM Service ToolKit.

Deployment is simple. There is one main web resource (tll_MMDPG.htm) that you embed as a web resource into any custom or system entity form on both Dynamics CRM Online and on-premise versions. Once embedded, it will read all your photos attached to notes on this record. Here is how it looks in CRM:


Dynamics Photo Gallery MMDPG
Dynamics Photo Gallery MMDPG


Important Notice: Microsoft Dynamics 365 Photo Gallery – MMDPG – is provided as is with no warranties under MIT license with the condition / requirement to preserve the name of the publisher and author (Mohamed Mostafa) and a copyright statement within the code to refer back to the author and the original solution.

Some of the built-in features and functionalities that the Dynamics 365 Photo Gallery (MMDPG) provides are:

  • Display all photos added as attachments to Entity Form Notes.
  • Only read and display photo attachments and ignore other file types.
  • Carousel Photo Gallery
  • Slideshow of photos
  • Start and Stop Slide Show
  • Thumbnails to select which photo to display
  • Next and Back arrows to move between different photos

Deployment Instructions:

  1. Import the unmanaged CRM Solution
  2. Publish All Customisations
  3. The main web resource tll_MMDPG.htm can be found under the Solution components list.
  4. Embed tll_MMDPG.htm as a web resource inside any of your entity forms both custom or system.
  5. The gallery is made up of 15 files including MMDPG main web resource.
    Make sure all 15 files are included in you CRM Solution and published.

MMDPG has been tested on Dynamics CRM Online 2016 (8.0 and 8.1), On-premise 365 and Dynamics 365 (8.2). However, I cannot see any reason for it not to work on other previous versions as it uses standard FetchXML calls.

Microsoft Dynamics 365 Photo Gallery MMDPG is provided free of charge, open source (MIT License with condition / requirement to preserve the author) and is available to download from this blog post (below). It is also available to download and contribute to on its Open source CodePlex project site. There is only one condition for the license which is the requirement to preserve the name of the owner and author (Mohamed Mostafa) and a copyright statement within the code to refer back to the author and this original work Dynamics 365 Photo Gallery MMDPG.

If you would like to contribute to this open source project by adding functionality and features, please get in touch via a comment below or through CodePlex. All contributor names will be listed here on the blog post. In addition to the author/publisher, current contributors are:

  • Anupam Khasa
  • … Contribute and get your name here

All enhancements and contributions are welcome. Please comment below if you want help or if you want to contribute.

#MSDyn365 Cloud CRM Online Strategic Business and Technical Considerations #MSDynCRM

Preface: This article is a follow up after a number of #MSDyn365 (Dynamics CRM) conference sessions where I talked about this topic. The presentation slides from the session are at the bottom of this post and I will be publishing a white paper with more details soon. Please comment below if you would like a copy of the whitepaper. This post builds on experiences (plus pains) and lessons learnt during a number of number of large scale multi-thousand users Dynamics CRM Online implementations taking into account data protection, compliance, regulatory issues and strategic considerations.


“The answer is the Cloud, what is your question?” I don’t know about you, but I have heard this sentence (or similar wording) quite a few times in recent years.

While you can argue for or against this statement, the way I see this, is on a case by case basis. Every organisation is unique and every digital & business transformation programme is different.

Having a blanket view or a pre-decided position, in either directions you go, may mean that organisations do not investigate or consider all factors affecting this extremely significant business decision. For this reason, in this article I am not going to recommend one way or the other but I’m inviting all readers to consider and evaluate the variety of factors that impact their move to the Cloud, or not.

Strategic Business and Technical considerations discussed in this article and the attached slides/white paper, are focusing on Microsoft Dynamics 365 Cloud or as previously known Microsoft Dynamics CRM. Technical, Integration and Reporting considerations mentioned may not apply to other Cloud CRM platforms. Unlike Microsoft Dynamics 365, other CRM platforms such as SalesForce may not have an on-premise version.

There are very good reasons for a CTO, CIO, Head of IT or similar leadership roles to decide that the Cloud is too risky and they want to do the implementation on Dynamics 365 on-premise. These reasons should not be trivialised or not considered even in our current Cloud First era. Some of the examples of really valid and common reasons to stay or choose on-premise are:

  • Cyber Security, Data Protection, GPDR, Data Location, etc.
  • Regulatory and Compliance
  • Maintenance, Support, Upgrade and BAU (Business as Usual Operations)
  • License Costs?
  • Technical considerations, Integration, Architecture, Design, Technology Stack & organisation echo system
  • Custom Development, Solution Complexity (including Integration complexity) and keeping up with regular CRM Updates

Each and every reason mentioned above, could literally take a whole article or even more. Hence, I won’t cover these here in this post but I’ll try to talk about them in more detail in the (soon-to-be-published) white paper I’m currently writing about the subject.

You can also listen to my recent talks in various Dynamics conferences where I talk about this subject extensively. A YouTube link will be published here soon <>.

While I won’t go through the details in this article, I am however going to say that I have personally spent days, literally, in never ending meetings to discuss just the regulatory, compliance and data protection aspect of going to Cloud Dynamics CRM with one recent 10K+ CRM implementations. After lots of trips between Redmond, Seattle and London, lots of Skype conferences, etc., we have all reached the conclusion that this highly regulated organisation can safely go to the Cloud CRM option as long as they implement a number of very detailed safeguards. It was a relief to reach that conclusion but it was also a great learning for myself and most of us involved (including our Microsoft colleagues).

Saying that, there are still good reasons that may drive your organisation to stick to the on-premise version. While License Costs may not be a reason any more following the new license model of Dynamics 365, but there are other technical considerations around a) Reporting, b) Integration and c) Technical. I list these below without detail at this stage but hopefully the talk and the white paper covers that sufficiently.

Reporting considerations for choosing Dynamics 365 (not exhaustive list):

  • FetchXML not T-SQL queries: Data Export Service to an Azure SQL database is a good possible solution
  • SSRS Server & unavailable report Scheduling
  • Queries 5 minutes timeout
  • Notes attachments of type images in SSRS Reports – SDK limitation
  • Limit on Charts and Grids of 50K rows

Technical considerations for choosing Dynamics 365 (not exhaustive list):

  • No Physical Access to the Database (e.g. indexing challenges)
  • Bulk Data Access – Data warehouse and BI access to CRM data
  • No access to Server Registry settings (e.g. timeout value changes)
  • Cloud Data Storage and associated costs. Audit Data and Archiving
  • Authentication and Active Directory Synchronisation
  • 2 minutes timeout limit for plugins and custom workflow execution
  • Limit* of 200 Workflows, 300 Dialogues and 300 Custom Entities

* Limit lifted – Now indicative only in Dynamics 365 Online according to this MSDN article:

Integration considerations for choosing Dynamics 365 (not an exhaustive list):

  • Firewall ports opening or,
  • Exposing web services externally for on-premise systems, which consequently require:
  • Data Security considerations
  • IFrames and Cross-Domain reference restrictions
  • Possible SSL requirements for certain
  • Telephony Systems integration (cloud PBX versus conventional PSTN)
  • Express Route as a possible solution


Finally, and perhaps very importantly, please consider the fact that a lot of the new features and capabilities in Dynamics 365 CRM that are Online Only and Cloud Only. A full list (with the MSDN source) can be found in the attached slides (pdf) available to download below. The list includes some significantly innovative and transformational features such as Project Services, Field Services, Relationships insights, Portals, advanced analytics, etc.

When I do this session, I always ask my audience for their opinions and make sure it is an interactive session. This is because the points I mentioned in the article are not a full list of all considerations and I’m sure there will be lots of different views for and against the content. Hence, you are strongly encouraged to share you objective and professional views based on your own learnings and experiences.

I’ll leave you with a snippet from my last talk about this subject in Dublin and I’m looking forward to read everyone’s view in the comments below.