Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Answered

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

  • Verified answer
    cchannon Profile Picture
    4,702 Super User 2025 Season 1 on at
    Re: Tracing errors

    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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 87 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 71 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 67 Super User 2025 Season 1

Overall leaderboard