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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Get getClientUrl in Ca...
Power Apps
Unanswered

Get getClientUrl in Canvas App (Code Component PCF Control)

(0) ShareShare
ReportReport
Posted on by 23

Hello All,

I am using a PCF control in canvas app, added a PCF control as a Code Component in Canvas App. The canvas app embedded in D365 form.

In my PCF I am trying to get ClientURL using below code:
let baseUrl = (<any>context).page.getClientUrl(); 

It works fine when I add the control on the form, but when I use the PCF control in Canvas App, it gives below error:
getClientUrl: Method not implemented.

I couldn't find any details to solve this issue.
Note: The purpose of, getClientUrl is do API call.


I tried using this as well but this also doent work:
(<any>this.Xrm).Utility.getGlobalContext().getClientUrl();

Your help will be much appreciated.

Thank you!
Hemant

Categories:
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @hemantkumar ,

    Currently, within Model-Driven app form, you could use Power Apps Component Framework or native Client API Reference to access Entity resource. But within canvas app, you could only use Power Apps Component Framework.

     

    Currently, the getClientUrl() method is not supported within Power Apps Component Framework. If you want to use getClientUrl() method in canvas app, I afraid that there is no way to achieve your needs.

     

    If you would like this feature to be added in Power Apps, please submit an idea to Power Apps Ideas Forum:

    https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

     

    Regards,

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard