Export email messages with attachments from Dynamics 365 CRM - dynamics-crm

The constraints for this requirement are as follows:
For legislative and/or governance purposes, the organization I am doing this for needs a way to extract email messages (with attachments) from a cloud instance of Dynamics, given a start date and end date;
What's important is that the content be made available, not necessarily in a conventient format ("convenient" here I am suggesting is something like a neat MIME-encoded/RFC-822 formatted file, or even proprietary MS .msg format). So, for instance, simply dumping the email body as a file, and the associated attachments as other files, grouped together in a folder somewhere is good enough;
The solution needs to be as simple as possible, and should have no technical support needs;
Here's the kicker: as much as this solution will necessitate a custom implementation (that is, code), we cannot employ anything outside the constraints of what we currently have in our Azure tenancy, that being: Dynamics 365 with the option of uploading custom plugins and/or custom workflow tasks or currently paid-for PaaS facilities, notably Flow. This eliminates the option of having a console-based application, or even a web app.
I am aware of the fact that one can use Dynamics Advanced Find to export email data (even the body of the email sans attachments) into an Excel file. We do need the email attachments, however.
What is a good way of implementing the above solution?

Related

Send form from Lotus Notes to Outlook

I have a Lotus Notes database design that I'm working on in which a user will request a data change that requires manager approval.
My concept is to automatically email the relevant manager with the details of the request using the NotesDocument.Send(True) to attach the form. This form displays the relevant information and has two buttons, to either approve or refuse the request without having to open the original document in the front-end. This is all fine and doesn't present any problems.
However, I've recently been told that the users will soon be switching to Outlook. Is there a way of doing the same. The users will still be using Notes for all our bespoke systems, just not for mail or calendar, so I can potentially add links to the document.
One thought I had was to supply two links to the document, with different parent views, and then have the QueryOpen code use NotesDocument.ParentView to ascertain what action to take. The downside to this is that the UI focus will switch to Notes.
Any other suggestions, such as links/buttons that will email back to a mail-in database with a subject like "REF 0012345 APPROVE" or "REF 0012345 REFUSE"? Can that be written in a Notes email doc to go to outlook?
You can create an HTML email including two (or more) buttons. On click you call an agent by Url and have the action and the target as parameter.
Look for the following command in the designer help:
?OpenAgent
For sure the http task has to run on the domino server.
Best
Thilo
I'd go with the approach of two links going to an agent, with one link ending in ?OpenAgent&Approve&Ref=xxxxxxxx and the other ending in ?OpenAgent&Refuse&Ref=yyyyyyy.
Here's why...
I'm not saying this will happen in your organization, but in a lot of organizations the move to Outlook for email has been the prelude to reducing the number of Notes clients that are installed. The Domino servers live on for years, but there are fewer and fewer clients. It gets to the point where it is only installed for users who need the client for business-critical applications. As time goes on, fewer and fewer people have Notes clients and eventually, the question will come up about why all managers need to have the Notes client. Since you're designing this now, you might as well take that into consideration and provide for the day when most managers will not necessarily need a Notes client.

Opening a public folder item via code and confusion about ids

After some reading I'm beginning to understand that there are multiple formats for the various ids used in exchange and Outlook. I'm trying to clear up some confusion, here is the scenario.
We have a vendor product that is crawling public folder content in Exchange server and identifying messages that meet certain criteria. When this software captures each message it stores an id that looks similar to the following:
AAIARgAAAAAAGkRzkKpmEc2byACqAC/EWgkAzDDxpv7lakqqtxgSLYsXTwAAAoOedgAA+v7vRoYnskqzbHwT4KwucwAAIH9adQAALgAAAAAAGkRzkKpmEc2byACqAC/EWgMAzDDxpv7lakqqtxgSLYsXTwAAAoOedgAA
I'm responsible for writing a WinForms application that presents these messages in a list and among other things allows them to open the message in Outlook. For purposes of this question, you may assume the user has access to the message.
In looking through the Outlook API and inspecting the message properties it looks like the only id I can find there takes the form:
000000001A447390AA6611CD9BC800AA002FC45A0900CC30F1A6FEE56A4AAAB718122D8B174F000002839E760000FAFEEF468627B24AB36C7C13E0AC2E730000207F5A750000
I've read material that suggests these could be the same id expressed in different formats but have had no luck using the ConvertId operation in the EWS services.
Can anyone confirm whether these are truly different representations of the same id or completely different entities? And whether it is possible to get from one to the other?
These are not the same ids - they are different ids referring to the same object.
If you are having problems with the ConvertId EWS separation, you might want to post a separate ConvertId specific question.

Microsoft Flow integration

I read an article about Microsoft Flow. I was wondering if it is possible to trigger events using this in an external website.
For instance, supposing a post is made on Yammer for some approval flow based application. If an authorized user comments saying "Approved", this must trigger an action in my external website.
Is this feasible using Flow?
You can also make your own custom connectors if your website has a RESTful API. https://learn.microsoft.com/en-us/flow/register-custom-api
There is an event for Yammer in Microsoft flow. I have something set up similar for my company and Twitter. When our company is mentioned it sends a message off to our social director.
I have several such flows for things like Yelp, Twitter, Facebook.
You need your Yammer account.
The events that you can trigger from and then include a trigger word or phrase are:
Get All messages
Get Messages in a group
Get Messages from my Following Feed
Post Message
Once you have that trigger its simple enough to look for the key word within a condition step.
Chances are good there is already a template for this in Microsoft Flow. Just look at the ones for Yelp, Facebook, etc. and modify for your needs
Just as AJAX mentioned, you can apply your own Custom Connector for a case like this. A Connector is the "plugin" used with a Flow, such as Yammer.
It's a bit late since November 28th (practically a 30-day late response here), but PowerApps allows you to create your own Custom Connector applying Microsoft's API. You'd be able to plug into your website (GET, POST, etc) directly with this when you create a trigger (the condition met true) that would launch an action. If you created your own API, Microsoft would have to validate if it's met standards pertaining to security.
By applying PowerApps, you'd be able to create your own actions and triggers. From this, you can integrate your own web based process' based on documentation that was observed: https://powerapps.microsoft.com/en-us/blog/brand-new-custom-api-experience-in-powerapps/. From here, you'd be able to customize it was needed.
JSON is required for some circumstances, however Postman would be a great IDE to consider as it also applies a pre-approved API by Micrsoft.

VBA vs. VSTO vs. Office.js vs. MS Graph vs. MS Flow

I have Outlook 2016 using Hosted Exchange. Here's what I need to be able to do:
Add Outlook tasks automatically when adding a contact via a custom form.
Send a premade .doc, .html, or .mshtml file via email to a set of contacts.
Keep track of who has received what premade email
I have some JS experience, but I'm not afraid of getting into .NET or VBA. I'm leaning towards VSTOs because, from what I've read, Office.js doesn't seem to allow for much interoperability between, say, Word and Outlook.
Any advice would be greatly appreciated.
From what you describe, I would step outside of Outlook all together and use theMicrosoft Graph API. Using Graph you could wire up a Webhook so you can capture when a new Contact is added and then send an email with a file attachment. You could then use Extended Properties to tag each Contact with the document/email they received.
I would also suggest taking a look at Microsoft Flow. For workflow scenarios like this, it may be a better fit.

Outlook 2013 Custom Fields - Embed data in "content"

I've just discovered that you can make custom forms in Outlook 2013. Now, we currently use two calendar apps, one which is very specific to our business needs and the other is Outlook 2013 (Office365). We currently sync some events, but not all, since the extra events don't have any place in Outlook as they'd be missing a tonne of relevant data, or it just wouldn't be readable.
Is it possible to "embed" this data in the content of a custom form, then read this using VBScript/some other method? If we could do this, then it would make the readability of the bespoke events in our business calendar a lot easier. I cannot find anything on this online (probably because I don't know exactly what to search for). I do not need the outlook version to update the business calendar.
For example, data might look like this
{"primaryGroup":"01-XUA-AL","eventName":"Customer Request 192"}
Outlook custom forms is a relatively old technology. I'd recommend using the Outlook form regions for customizing the UI. See Creating Outlook Form Regions for more information.
You may embed a custom information into user properties. They are preserved if the corresponding properties are defined on the recipient Inbox. See Changes to custom properties in Outlook for more information.

Resources