A Tip For Working With Portal Attachments

When a portal customer uploads a document using the portal they create a note in Dynamics with an attachment. This sometimes happens explicitly when there is a notes control on the page and sometimes indirectly when the ‘Allow file’ option is enabled on an entity or web form.

Often there is a desire to deal with these notes attachments differently to others created in the system or use notes created via the portal to trigger some kind of business process. The typical example, is for a customer to upload documentation related to their case, and that action to trigger the change of the case status.

While looking for a no code solution to this problem I discovered two things. Firstly, notes created by the portal have the prefix WEB added to the start of their description field. Incidentally, to ensure a note created in Dynamics is displayed on the portal, this prefix must be included. Secondly, notes created by the portal are owned by ‘SYSTEM’ regardless of whom owns the regarding record.

These two discoveries give us a little bit to work with, but not much. I don’t like the idea of hinging configuration on a prefix. I’d be too worried Microsoft will update how this works and suddenly my configuration won’t work anymore. The owner field seemed more reliable. My colleague and I attempted to add to a workflow the condition Owner = ‘SYSTEM’ however as this user isn’t really a user in the traditional sense we couldn’t select the value in the lookup. We could however jump down a level and add a condition along the lines of Owner’s last name equals ‘SYSTEM’. And with that we were able to deal with attachments from the portal differently to all other notes.

That is of course provided a Mr and Ms System never needs a licenseā€¦

Leave a Reply

Your email address will not be published. Required fields are marked *