Open Model Apps Url Using Unique Name

Richard WilsonPower Apps3 years ago8 Views

When generating links for records, lists or reports in a Dataverse environment it is important that they open the specific application they relate to so users have the best experience. To see more details about generating links for Dataverse click here.

2021-06-23_10-59-18
This image shows the message bar displayed within Dataverse when you open a link not directed to a specific application.

Previously in order to open a specific application using a link you had to create the it with the app suffix url or append the appid parameters to the url. In order to get either of those dynamically you need to query the Model-driven Apps (appmodule) entity and return the url attribute for the suffix or the appmoduleid attribute for the app id.

Using App Suffix

https://<Your Org>.crm.dynamics.com/apps/<Your App Suffix>/main.aspx?pagetype=entitylist&etn=contact

or

Using App Id

https://<Your Org>.crm.dynamics.com/main.aspx?appid=82853804-d2b3-4536-ba75-f49ccca681ea&pagetype=entitylist&etn=contact

Recently when creating a new App in the maker portal I saw the creation screen now includes a Unified Interface URL which populates when you set the name of the app. The format of the url looks like this.

https://<Your Org>.crm.dynamics.com/Apps/uniquename/<Your App Unique Name>/main.aspx?pagetype=entitylist&etn=contact

Because the unique name does not change between environment you can now eliminate any calls you previously did to the Model-driven App entity. You may still need to get the host url for the environment if using Power Apps or Power Automate.

To get the url in Power Automate you can make a call to any Dataverse entity and then parse out the url from the @odata.id value of any record you return.

uriHost(outputs('Get_CDS_Record')?['body/value'][0]?['@odata.id'])

The get the url in Power Apps you have some options. You can call a Power Automate flow which will call out to a CDS record and return the host url using the same method I described earlier or you can utilize the CDS Environment URL PCF component from Dan Cox.

Original Post http://www.richardawilson.com/2021/06/open-model-apps-url-using-unique-name.html

0 Votes: 0 Upvotes, 0 Downvotes (0 Points)

Leave a reply

Join Us
  • X Network2.1K
  • LinkedIn3.8k
  • Bluesky0.5K
Support The Site
Events
March 2025
MTWTFSS
      1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31       
« Feb   Apr »
Follow
Sign In/Sign Up Sidebar Search
Popular Now
Loading

Signing-in 3 seconds...

Signing-up 3 seconds...