Dynamics 365 Workflow - dynamics-crm

I have a workflow that automatically updates a contact to a specific owner that matches the linked Company owner when a contact record is created. What I want to do is to send an email when an owner changes AFTER a contact record is created. Any idea how I include this in a workflow? At the moment the e-mail is triggering when the first workflow is running which don't want.

Create a two-option field on the contact called "Creation Completed" or something similar, On the Assign WF put in a conditional branch:
If Creation Completed = false
Update Creation Completed = true
Else
Send Email
This should prevent an email being sent when the first workflow reassigns the contact.

What you can do is create a separate workflow that triggers when a Contact gets assigned:
To suppress the email for a period of time you could create a check condition to see if the Assign workflow is running more than X minutes after the CreatedOn time (in this case 15 minutes after).

Related

Get unique ID before saving the meeting in Outlook that must be same after saving the meeting

I'm working on Outlook add-in, In which we are providing the service for ordering the catering products during the meeting scheduling.
I want to send the order along with the meeting (for which meeting i ordered the products) so in this case i need any id i.e MeetingId So can save this meetingId and order detail in the database.
When i will open scheduled meeting from my Outlook calendar and on the behalf of that meetingId i can get the order detail from the server and i can update the order.
So i'm looking any solution, Please share your suggestion here how can i update my order inside the Add-ins from already scheduled meeting.
On the compose form you may call the Office.context.mailbox.item.saveAsync method and then get the itemId property value. There is no need to call the saveAsync method if the appointment was saved previously.

REDCap - Sending out automated emails after searching in the data for condition

I am migrating sql server database into REDCap. I am new to REDCap and I am still investigating the features of REDCap. I am building a survey form that will collect all the data into REDCap. Once the data is there in the REDCap, I want to send emails based on the date in the future. For example, if there are fields in the instrument as below
Email
Expiry Date
test#gmail.com
12/12/2021
I want to send automated email to that email address(test#gmail.com) on that date date (12/12/2021). Basically, it has to look at the data and send out reminders to the email address on the expiry date.
I looked at alerts and notifications. I can write the conditional logic to send the reminder upon data entry. But, here in my case, the data is already stored.
I looked at the scheduling module. Scheduling module is generating events on the calendar but not sending emails automatically.
Is there a way I can achieve this?
Which version of REDCap is your institution on? Since version 9.9.1 you can have an alert send either before or after a date field in your project. So the alert can be configured to be triggered by data import, and the time to send would be, say, 5 days before the [expiry_date].
Here is the changelog entry:
Improvement: A new send-time option has been added when setting up Automated Survey Invitations and Alerts & Notifications. When defining
when the ASI/Alert should be sent, the option “Send after a lapse of
time” has a new setting added so that, if desired, the user may set
the time lapse relative to the value of a date or datetime field in
the project. In previous versions, the time lapse setting could only
be set relative to the time in which the ASI/Alert was triggered. That
is still an option, but now users may also opt to send the ASI/Alert a
certain amount of time either before or after the date/time of a
specific field. This new setting will allow users to have greater
control with regard to setting when ASIs/Alerts will be sent without
getting too complicated in their setup, such as having to use complex
logic (with datediff, etc.).
As the changelog says, another method is to use datediff logic in the trigger, which you will need to use if you are not on v9.9.1 or later (you should also encourage your institution to upgrade since there are important security patches since then). When an alert has a datediff function in its logic, REDCap will check it every four hours (unless the frequency has been changed by your administrators). This means you can send the alert 5 days before the expiry date with this logic:
(existing logic) and datediff("today", [expiry_date], "d", true) = -5
The true parameter here returns the signed value, so that if the first date is later than the second, it will return a negative value. false returns an absolute number.
This will be true on the exact day when [expiry_date] is 5 days in the future.

How to programmatically set the subject (title) of an Outlook 365 meeting from user data entered at runtime

Background
Our Training team uses an Excel worksheet to track our online training, listing the date, customer, topic, type of training, type of meeting (Teams live event or Teams meeting), presenter, and moderator. In addition to the information in the worksheet, we create an Outlook 365 meeting for each workshop. The subject (title) of the Outlook meeting takes this format: {Customer} {Topic} {Event Type} {Meeting Type} {Start}.
Goals
Replace the Excel worksheet with an Outlook 365 view in table
layout, eliminating a time-consuming and redundant step in our process.
Minimize data entry.
Do 1 and 2 in such a way that I can distribute the solution to our Training team without involving a request to systems admins or requiring our team to do any heavy lifting code- or configuration-wise.
Problem
I've tried two methods and am getting stuck at the same spot: I can't figure out how to set the meeting request subject equal to the information entered by the user.
Progress
Method 1: Outlook form or template
I modified P.2 in an appointment request in Outlook 365 to be a data entry form for the custom fields Customer, Topic, EventType, MeetingType, Presenter, and Moderator. Another custom field, TrainingEvent, is a read-only Boolean set to Yes when the appointment is created. I use this field to filter non-training events out of the new calendar view. Another custom field, EventID, has an initial value that concatenates the other fields in the order we need for the meeting subject. I saved the modified request as both a form and an Outlook template to test each method.
Both work fine, right up to the point of setting the actual meeting subject equal to the EventID. That is, when I submit the request the meeting is created and all the fields are populated with what I entered. The subject remains empty. I can't find any guidance, using VBA or otherwise, on how to populate the subject based on user entry at runtime.
Method 2: Microsoft Forms + Automate
So I tried another way: I created a form in Microsoft Forms to collect the same data, then ran it through Microsoft Automate modifying an existing template that creates an Outlook 365 event when a form is submitted. Same result: The event is created with all my entered data, but the subject remains empty.
Obviously, I could just ask our team to enter all the separate fields and also the subject, but that defeats goal #2.
What am I missing? This feels like it should be such an easy problem to solve.
I found the answer. I added the Subject field to my custom P.2 (data entry form). In the field properties on the Value tab, I changed "Property to use" from Value to Text and set the initial value to the concatenated field EventID. Voila!

Flow to pull name from email and put in a todo list

How can I build a Microsoft flow to pull a name from an email and place it into a todo list/excel file to check off if I viewed the person or not. Example: different email received from mother everyday to add someone new to the invitation list. And place that person in a todo list or excel file. Different person in each email. Is this possible?
Sure - create new flow with When a new email arrives trigger linked to your Outlook account. You can define specific e-mail address or e-mail subject to look for in your Inbox.
Then we assume that received e-mail contains only new person data which is triggerBody()?['Body'].
Crate some Excel sheet for eg. on your OneDrive account and put single column table inside.
Finally Add row into a table action is needed.

Using workflows in Dynamics CRM. Static fields?

My first question here. I am relatively new to Dynamics CRM and I am looking to do a customization using workflows and I have run into some issues.
I need to trigger an email to a user if I have 5 records with a specific value chosen in an option set within the last 15 days.I thought I might need a static variable kind of field for the entity. I don't really know how to get that in CRM.
While I have been able to use workflows to get the records within the 2 dates and increment the count for that condition, the count maintained is not static and so it is basically useless for my requirements.
Any suggestions to work around this?
One way of doing it is to have a custom workflow.
Whenever a new record for that entity is created, run this custom workflow and get the count and return it via an Output parameter. Check for the output value and if that is more than the threshold as in the requirement, then consider the step for sending an email to the user, otherwise complete the workflow as succeeded.

Resources