| Anas Arshad
Add URL of record in Item link in Approval – Power Automate / Dynamics 365
To add the URL of record in an approval item link in Power Automate/Dynamics 365, you can use the following steps:
- After you create the record, add a "Get Record" action to your Power Automate flow to retrieve the record's URL. To do this, select the appropriate connection to your Dynamics 365 environment, choose the entity that the record belongs to, and provide the record's ID.
- Add a "Compose" action to your flow to build the URL for the record. Use the following formula:
concat('https://yourorg.crm.dynamics.com/main.aspx?etn=', replace(outputs('Get_record')?['$entityName'], '_', ''), '&id=', outputs('Get_record')?['$id'], '&pagetype=entityrecord')
Note: Replace "yourorg" with your organization name and adjust the formula as necessary to match your environment.
- In the "Start and Wait for an Approval" action, select the "Details" field and click "Add dynamic content". Select "Expression" and enter the following formula:
Note: The URL is a variable which contains the output of Compose.
This creates a hyperlink in the Approval field that opens the record in Dynamics 365 when clicked.
Note: If your email client or device does not support HTML links, you may not be able to click the URL.
Join us next time, as we continue our journey of learning canvas apps.Click here to learn more about Imperium's Power Apps Services. We hope this information was useful, and we look forward to sharing more insights into the Power Platform world.