Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2021 Release Wave 2Discover the latest updates and new features releasing from October 2021 through March 2022.
2021 release wave 2 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I'm working on an email workflow in Dynamics so that, whenever an email enters system, it is checked for whether a specific attachment is included. i.e. it just checks the email attachments for an attachment with a given filename string, and then either performs an action on that record (or doesn't) accordingly.
Whilst I can make a view that will filter all emails with this attachment, I cannot find the same Attachments (Item) option in the dropdown in the workflow wizard.
Please may I have some advice on how to achieve this. I have lots of additional workflow solutions (like Jason Latimer's ones), and delete/add attachment by name having counted attachments before and after was one idea. But for whatever reason it never thinks the count has changed when I compared the before count to the after one.
Hi,Instead of OOB workflow, you can use the power automate.For e.g.
We can create Power Automate on Attachment(activitymimeattachment) Entity then we can retrieve the email record using Object Id Value(_objectid_value)
Now, we can check Email Status If it Received then We can retrieve the attachment record and we check the file name. Email Status Reason:Power Automate:Part 1:Part 2Thanks,Pradeep.Please mark this as VERIFIED if it helps.
Hi Pradeep - thanks so much for this. I've not really used Power Automate before. Could you explain in a little bit more detail the process of "We can create Power Automate on Attachment(activitymimeattachment) Entity"
Power Automate: In power automate we have lots of connectors which we can use in our development.
Here we do not need write the complex code C# etc. instead we have connectors.
Let us discuss about your scenario.
In your case you have WORKFLOW and in workflow based on business requirement we used to add the steps(i.e. Create, Update etc)
Same logic we can use in Power Automate as follows:
Lets say when Email record received IN CRM system then CRM create Email Records in Email Message entity.
Now if email contains the attachment then Attachment record will be created in Activity MIME Entity .By using above logic I have developed above Power Automate.As you know all data get stored in Dataverse hence we have used the Dataverse Connector in Power Automate.Hope this helps.Thanks,Pradeep.Please mark this as VERIFIED if it helps.
Thanks very much - I can now see where I should do this
Please could you show me the original screenshots with each step of the process opened out (rather than just being the bar with just the title)
Hi,Sure. happy to help you.
Please find the screenshots:
Thanks,Pradeep.Please mark this as VERIFIED if it helps.
Thanks so so much Pradeep - I'm really appreciating your help
i'm trying to just check for the attachment name with the "check condition" stage, as per the below (but get the above error):
When I audit the attempted running of the process, and look at the raw outputs for the attachment record, I note that there is no output for the filename:
Could this be why the above issue is happening? i.e. because it cannot find the filename field for the attachment?
Yes. In If condition the fileName field is Null.
To Resolve that we need to retrieve same record again.In previous screenshots which i was shared. There No.4 screenshots performs the same action.There, i am retrieving same entity record to get FileName. because initially it was not present.
hi - i am honestly so grateful for your help and very sorry that i'm not quite getting there
this was the full process that was failing
- i initially analyse the attachments
- then initialise the string variable containing the text i'm looking for
- then i check to see if the attachment name contains the string (but this is where it fails)
how exactly would i retrieve the record again?
when i do get record by id as follows, i cannot then reference this output in the check condition stage afterwards? it still only lets me reference the initialised variable I set containing the text string
thanks so so much again
Hi,I will try again.
Screenshot of your Power Automate:Please add steps 2 as shown below:Now,In the next steps you use the Step2 File Name attribute. To check your specified condition For e.g.Note:In Power Automate We access any fields values of previous steps.E.g. in If condition i can access the field from Step 1 and Step 2. Same applies for Other part of Power Automate.Hope this helps.
Amazing! Thanks so much - it now runs successfully. You've been a fantastic help and it really is appreciated!
I am happy to help you.
Business Applications communities