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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

Tracing errors

(0) ShareShare
ReportReport
Posted on by

Is there a way to trace errors to the dynamics tracing log in a pcf component like you would for a .NET plugin?

 

I am developing plugins that are called frop a pcf component. In the plugin, any errors are traces using ITracingService. 

 

What I was wondering is if it was possible to do the same thing in the power apps component framework to trace errors component side

I have the same question (0)
  • Verified answer
    cchannon Profile Picture
    4,702 Moderator on at

    Well, it should be pretty straightforward to write your own using Context.WebAPI.CreateRecord -- the main thing that would make rolling your own difficult in Plugins is the transaction rollback, but there is no such mechanism client-side, so no such worries. Maybe try something like this (I haven't tested it, so there might be more required fields you need to populate before this code will work!):

     

    public trace(traceMessage: string){
     let trace: ComponentFramework.WebApi.Entity = {
     text: traceMessage,
     }
     this._context.webAPI.createRecord("tracelog", trace);
    }
    
    public init(context: ComponentFramework.Context<IInputs>, notifyOutputChanged: () => void, state: ComponentFramework.Dictionary): void {
     this.trace("Entered init function! Trace it!");
    }

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard