web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Human Resources forum / Getting related Leave ...
Human Resources forum

Getting related Leave Request Details using Leave Request in Microsoft Flow

(0) ShareShare
ReportReport
Posted on by 80

Hi all,

Currently working on an integration at the moment, and it involves exporting a Leave Request and its related Leave Request Details using Microsoft Flow once the Leave Request is approved.

Can't seem to get the related Leave Request Detail entity using either the "Get record" or "List record" CDS actions. "Get record" doesn't accept the foreign key Leave Request as its item identifier - it says "cdm_leaverequestdetail With Id = c94b244c-fdd9-e911-a977-000d3ab6d727 Does Not Exist", and "List record" says "Could not find a property named 'LeaveRequest' on type 'Microsoft.Dynamics.CRM.cdm_leaverequestdetail'." 

Is there a different way of retrieving the Leave Request Detail via Flow using a different property?

Any help is greatly appreciated.

Categories:
I have the same question (0)
  • Suggested answer
    Ciara Lynch Profile Picture
    80 on at

    If someone else is struggling with this, I managed to fix my issue! You can have two triggers - one for the details and the other for the request. You can then use a "Do until" action to effectively wait until the condition is correct. Hope this helped someone!

  • Suggested answer
    cbboatwr Profile Picture
    5 on at

    The field you need to use in your filter query is actually "_cdm_leaverequestid_value" and not "cdm_leaverequestid" ... I have no idea why it puts the underscore in front and a "_value" at the end, but if you do a general List Records with all records (and do a top=1 just to limit the results) you'll see that "_cdm_leaverequestid_value" is returned. So later in your Flow you can do an expression of first(body('LeaveRequestDetails')?['value'])?['cdm_leavedate'] (or whatever field). [This assumes the action is named "LeaveRequestDetails" like my example below ... which has a trigger of an update on a LeaveRequest entity. So you can avoid the double trigger and wait until mentioned in the other solution (which I didn't true, but I assume would work as well).

    pastedimage1591739752804v1.png

    Hope this helps!

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

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

Leaderboard > Human Resources

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans