Skip to main content

Notifications

Dynamics 365 Community / Forums / Sales forum / error sending automati...
Sales forum
Suggested answer

error sending automatic mail with attachment

Posted on by 448

Hi all,

I send an email to some user when a file is added in CRM.
When I insert the file the program asks to save before adding the file, so Automate throws this error .... when file is added the flow work well.

Can somebody suggest some idea to prevent the first step (save before attaching file) error?

Thanks for any idea or suggestion

pastedimage1673538612234v1.png

  • Suggested answer
    Amit Katariya007 Profile Picture
    Amit Katariya007 5,801 Moderator on at
    RE: error sending automatic mail with attachment

    Do you want document which are present on the Document location entity correct ?

    If yes then you will have to get this documents from the share point. There is a reason behind it, As you have document location which is a indicator that you have a active share point integration with the D365, So when user will try to add a document to respective record it will be stored in share point, Before saving it will create a initial folder and saves your files in share point to reduce the CRM burden.

    Please refer below which will provide more information about it.

    immersivecoder.com/.../

    Thank You,

    Amit katariya

  • DiePic Profile Picture
    DiePic 448 on at
    RE: error sending automatic mail with attachment

    Hi Amit Katariya007 

    as specified in last post, there are 2entities:
    - opportunity
    - opportunity documents

    in the 2nd entity are stored the attachments

  • Suggested answer
    Amit Katariya007 Profile Picture
    Amit Katariya007 5,801 Moderator on at
    RE: error sending automatic mail with attachment

    Where does your attachment? on Opportunity or some other entity? because as per Pradeep's example attachment is part of account record and when we try to get the account record info, attachment will be also part of the payload.

  • DiePic Profile Picture
    DiePic 448 on at
    RE: error sending automatic mail with attachment

    Hi  Pradeep Rai 

    thanks for your cortesy and your kindness.
    Maybe I've not understood, my english is not so good  ...

    I have no filter condition in any step .... I try to put some filter to avoid the problem of error (1st post) when create the document, that get well when I attach the file.

    In "opportunty" I have no files attached; files are attached to "Opportunità_Documenti" (opportunity documents in english)....I take a look at output of opportunity table and there are nothing about attachments.
    My last post was a question, if there is a possibility in a similar way.

  • Suggested answer
    Pradeep Rai Profile Picture
    Pradeep Rai 5,490 Super User 2024 Season 2 on at
    RE: error sending automatic mail with attachment

    Please try by removing filter condition and you can get the filename from "opportunity" entity it self.

    For e.g. on opportunity you have file type field with logical name as cr07a_fileoppallegato then just add "_name" at end during record retrieval as shown in below example done on account entity.

    pastedimage1673609478710v1.png

    After runs,

    pastedimage1673609549155v2.png

    Actual logical name:
    pastedimage1673609602618v3.png

    Hope this helps.

    Thank You,
    Pradeep Rai.

  • DiePic Profile Picture
    DiePic 448 on at
    RE: error sending automatic mail with attachment

    Hi Pradeep Rai 

    in other flow  that I've find in my organization (send an email when opportunity is acquired), I find a similar trigger that is working well with parameters highlighted.
    In my flow the parameter to put in "Select Columns" is "cr07a_fileoppallegato", but i dont know the parameter to insert in "Filter Rows" to try ....

    I thought that something like "cr07a_fileoppallegato ne null" but the flow doesn't start.


    pastedimage1673607208474v2.png

  • Pradeep Rai Profile Picture
    Pradeep Rai 5,490 Super User 2024 Season 2 on at
    RE: error sending automatic mail with attachment

    Will check on this.

  • DiePic Profile Picture
    DiePic 448 on at
    RE: error sending automatic mail with attachment

    Hi Pradeep Rai 

    pastedimage1673605955477v2.png

    In the trigger I'm not able to find the complete name of file attached that I insert in final mail

  • Pradeep Rai Profile Picture
    Pradeep Rai 5,490 Super User 2024 Season 2 on at
    RE: error sending automatic mail with attachment

    Hi,

    Thank you for details.

    I have one question,  what is the use of steps 2 because the records GUID we can get from trigger point

  • DiePic Profile Picture
    DiePic 448 on at
    RE: error sending automatic mail with attachment

    Hi Pradeep Rai 

    thanks for suggestion, I've a case as your. I try to replicate:
    pastedimage1673603540144v1.png

    but result is the same: 


    1st in red give the error of "no file attachment"

    2nd works
    pastedimage1673603572902v2.png

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Dynamics 365 Community Newsletter - August 2024

Catch up on the latest D365 Community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,186 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 227,996 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans