Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archive)
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,575

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
    1,575 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
    1,575 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

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Blog subscriptions now enabled!

Follow your favorite blogs

TechTalk: How Dataverse and Microsoft Fabric powers ...

Explore the latest advancements in data export and integration within ...

Leaderboard > 🔒Ι Microsoft Dynamics CRM (Archived)

Featured topics

Product updates

Dynamics 365 release plans