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 Apps
Answered

Tracing errors

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 408

#2
timl Profile Picture

timl 340 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 319

Last 30 days Overall leaderboard