Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Unanswered

How to Expand D365/Power Automate Data Query Problem with "Expand Query" Filter on a Field on a Related Entity/Table?

(0) ShareShare
ReportReport
Posted on by 1,579

I am running a process that is moving D365 email attachments to azure blob storage.

There are hundreds of thousands of attachments so I need to speed it up.

Due some limits I have to pluck them off one by one and am using the following to do so.

Screen-Shot-2022_2D00_03_2D00_28-at-4.01.00-PM.png

The problem is I need to create a second one that starts at the bottom or grabs the top record where the sort is back created on date desc. 

How do I need this so that I can filter on the email entity's created on date? 

Keep in mind the email entity is an expanded query and is a separate d365 table than attachment. 

Attachment does not have a createdon or modifiedon date I can sort by,

I get an error saying the property does not exist if I add createdon desc in the sort by field.

How can I add a desc order by email createdon desc or an order by email createdon asc to this?

  • ACECORP Profile Picture
    ACECORP 1,579 on at
    RE: How to Expand D365/Power Automate Data Query Problem with "Expand Query" Filter on a Field on a Related Entity/Table?

    If I try the following in the expand query section: objectid_email($select=activityid) $filter=createdon gt DateTime'2012-05-29T09:13:28'

    I get the following error: Term 'objectid_email($select=activityid) $filter=createdon gt DateTime'2012-05-29T09:13:28'' is not valid in a $select or $expand expression.

    I am sure this is not being written correctly and is basically a syntax or format error, but I do not know exactly what I need to change to fix it. 

  • ACECORP Profile Picture
    ACECORP 1,579 on at
    RE: How to Expand D365/Power Automate Data Query Problem with "Expand Query" Filter on a Field on a Related Entity/Table?

    If I edit the Expand Query to this: objectid_email($select=activityid) and $orderby=createdon asc

    I get the following error: Term 'objectid_email($select=activityid) and $orderby=createdon asc' is not valid in a $select or $expand expression.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,703 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,433 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans