Dynamics 365 Attachment Management and Dynamics 365 Online Portals – Do not mix!

UPDATE: The latest version of the Attachment Management solution has the ability to specify the entities that will utilize the solution.  Be sure to “un-select” the adx_webfile entity and the ensuing disaster described in this post will be avoided.  🙂

12-attachment

Original Post here…

A while back I wrote about Microsoft Dynamics 365 Attachment management solution from Microsoft AppSource as a way to move email and note attachments to Azure to conserve space.

attachmentmgr
Attachment Management on AppSource

I discovered an issue with the solution that will adversely affect your Dynamics 365 Portal installed on the same tenant.

I needed to make some updates the theme.css file for my portal.  I made the changes in an editor and then attached the file to the Webfiles record in Dynamics 365.  If you have worked with the Dynamics 365 Portals you know that files like CSS and images are stored as note attachments to portal Web File records.

theme
Updating CSS file.  This can be done from front side editing as well.

Before updating the theme.css file, the portal appeared normal:

portalgood
Normal Portal before theme.css updated.

However, after updating the theme.css file I got this:

portalnotgood
Whoops.

It appeared that I messed up editing the theme.css file; which is extremely likely as I am actually NOT any kind of CSS expert, I know just enough to be dangerous.

I re-downloaded, made a few adjustments and uploaded, still the same issue!  I refreshed the portal cache (here’s how) and I even restarted the portal from Office 365.  The Portal still had issues rendering.

I finally decided to restore the original CSS file… however, the portal was still messed up (again after many refreshes and restarts)

keep-screaming-and-running-around-in-circles

I wasn’t sure at all what the issue could be… I tried recreating, double checked every setting until I remembered that this Dynamics 365 instance had the Attachment Management solution installed and configured.  The app will copy ALL attachments to Azure, including Portal files!

I went into Dynamics 365 customization and disabled the Attachment Management plug-ins and then re-added the theme.css file.  BOOM.  Problem solved (for now).  The Portal reads the attachments, not from Azure, so it never was able to find my updated theme.css file.

disableplugins

The Attachment Management solution will only move attachments to Azure when they are added or updated, and not existing files.  Since the portal was setup before I setup the Attachment Management, I never noticed until I needed to change some files.

I reported the problem to AppSource support so hopefully this gets properly fixed in the future.  In the meantime you will need to disable the plug-ins before doing any kind of portal work involving CSS or image files or just not use the Attachment Management app at all and look at other 3rd party solutions.

If you do use, remember to to re-enable the plug-ins when done.

Hope this helps!

Cheers
Nick

Nick Doelman is a Business Solutions MVP and is currently trying to investigate where the summer went.  Nick will be at CRMUG Summit and will not turn down any offers to have a beer and chat about Dynamics 365, Hockey or Powerlifting.

 

14 thoughts on “Dynamics 365 Attachment Management and Dynamics 365 Online Portals – Do not mix!

      1. Hello Suresh,

        I would say attachment management is working well. All attachment in notes and email are copied to azure blob storage. Attachment upload via notes are able to see by users. However, the recipient not able to see the email attachment. Only sender able to see his own attachment in sent email.

        We would like to seek your expertise regarding the issue. Your kind advice in this matter would be very much appreciated.

        Regards,
        Kelvin

        Like

  1. hi, is it not possible to configure so that all file attachments are store on server/sharepoint as files rather than within the database?
    Seems silly to load-up expensive databases with tones of files in this century.

    Like

    1. There is no “out of the box” configuration option to do this (should there be? I think so).
      However, that is why there are 3rd party products and the Microsoft Labs solution on AppSource as described in this post.

      Like

    1. I don’t think there would be an easy way. After you create the sandbox copy when you navigate to the records (in Sandbox) you would not be able to retrieve the attachment. I suspect you would likely also get an error when you open the record. I think you would need to copy the Azure containers (if that is even possible) and after you copied the sandbox go in and reconfigure the attachment management solution in sandbox to point to the copies. I have not tried this yet so I really don’t know the results. Great question.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s