Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

D365FO Alert triggered flow - Use data from triggered record as a query in condition

Hi Experts,

I'm quite new to power automate so apologies in advance. I'm trying to build a flow with D365 Finance and Operations. I'm using alert as a trigger.

What I'm struggling with is whether it's possible to analyse source record that triggered the alert and use it as a condition in my flow. Let me explain in the example below:


  • I create alert on purchase order line (when quantity is decreased).
  • When alert is triggered, I want the flow to find out which purchase order line has triggered the alert so that when I create a condition in the flow, I will be able to query other data found on selected purchase line
  • E.g. quantity has been decremented for item A, purchase order 1234. Condition is set to check if selected line has got another field from PurchLine table set to TRUE.

When I look at the alert record created in D365FO, it doesn't show me any data that could identify source line and enable me to achieve above. Surely it must be available in the scheme?

Super User
Super User

Hi @AdrianPeterson,


I believe the body response should contain a key value 1 and 2 which you potentially could use to meet your requirements. Below is an example.


1. Use a When a Business Event occurs trigger action



2. Add a compose and use the body dynamic value from the trigger action



This is the output of the compose. I believe Key value 1 is the PO number and Key value 2 is the Item number. 

  "BusinessEventId": "BusinessEventsAlertEvent",
  "ControlNumber": 5637238333,
  "DataAreaId": "ubsl",
  "Email": "",
  "EventId": "755F8B54-904A-44D2-A7BE-3CAAB981AECC",
  "EventTime": "/Date(1612458280000)/",
  "FieldId": 0,
  "FieldLabel": "<All fields>",
  "FieldName": "",
  "KeyValue1": "699966",
  "KeyValue2": "ABCDEF",
  "Link": "hyperlink",
  "MajorVersion": 0,
  "Message": "",
  "MessageDetails": "View Purchase order: 699966, ABCDEF",
  "MinorVersion": 0,
  "ParentTableId": 15456,
  "RuleId": "000070",
  "Subject": "Record has been created in Purchase order lines",
  "TableId": 15456,
  "TableLabel": "Purchase order lines",
  "TableName": "PurchLine",
  "TypeTrigger": "RecordInsert",
  "UserId": "Test"


Maybe you can use those key values to actually retrieve the PO line?

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Users online (3,633)