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 Platform Community / Forums / Power Apps / How to debug Custom AP...
Power Apps
Unanswered

How to debug Custom API (unbound action)?

(0) ShareShare
ReportReport
Posted on by 264

Hi, Guys!

There is a lot of info how to debug plug-in, it works.

In regular case I can "start profiling" and than get the profile to debug.

Max77_0-1692616063197.png

But I don't have a step. I created a new Message for Dataverse and going to call it outside or use Perform Unbounde Action in PA.

How to debug plug-in without a step?

I need a  way how to create Profile.

I have the same question (0)
  • Fubar Profile Picture
    8,340 Super User 2025 Season 2 on at

    I'm not a developer, so not sure if you can Profile not, but the message for the action will be the logical schema name of the Action (e.g. rather than Create etc the name of the Action is the message - it would be something like new_mycustomaction).  If you can't profile, the fall back would be add tracelog statements into your code and then view the turn on the Trace Log in dataverse and look at the entries that are written.

  • a33ik Profile Picture
    3,306 Most Valuable Professional on at

    Hello,

    Can you provide a few screenshots about your action and what specifically do you want to troubleshoot? Where is the logic of your action is located because there are few spots.

  • Max77 Profile Picture
    264 on at

    Update

    Step appeared after I installed Power Plafform Tools for Visusual Studio.

    New issue. The Profiling doesn't start

    Max77_0-1692693755028.png

     

    Max77_1-1692693924821.png

    Error message:

    Invalid plug-in registration stage. Steps can only be modified in stages BeforeMainOperationOutsideTransaction, BeforeMainOperationInsideTransaction, AfterMainOperationInsideTransaction and AfterMainOperationOutsideTransaction.

     

    So I can't profile and get Profile to debug.

    OK, I can create a new step and bound it to the special entity. The Event will pass context.

    @a33ik , is there a way to pass my parameters to debug?

    Maybe in Unsecure Configuration Tab?

  • Parvez Ghumra Profile Picture
    1,579 Moderator on at

    @Max77 One option might be to try the 'Custom API Tester' plugin in the XrmToolBox, although it wouldn't be strictly debugging but might help you test it quickly using different parameters 

    parvezghumra_0-1692702530762.png

     

  • a33ik Profile Picture
    3,306 Most Valuable Professional on at

    It's a little challenging to help you without having the full picture. I have a few questions:

    1. Do you use Actions (old crm 2013 feature that is still there) or Custom API (new feature that was introduced a few years back).

    2. Where the logic that you try to troubleshoot resides - is it in the code of the plugin or in the body of the Action itself if you use Actions, not Custom API.

    3. Any chance you can share screenshots on how you work with plugin registration tool - not only the screenshot of the profile registration that fails but something more - how the step is registered.

     

    In other words - help us to help you. The more information is marrier.

  • Max77 Profile Picture
    264 on at

    @a33ik 

    1. I created Custom API according to this article https://learn.microsoft.com/ru-ru/power-apps/developer/data-platform/custom-api

    Plug-in registration tool -> Register New Assembly

    Plug-in registration tool -> Register New Custom API -> choose the assembly, plug-in->Add input/ouput parameters

     

    2. It's the sample from the article https://learn.microsoft.com/ru-ru/power-apps/developer/data-platform/custom-api#write-a-plug-in-for-your-custom-api

    Ligic is in the plugin (Code)

    3. I have a separate accounting system and want to make Exchange mecanism using plug-in.

    The sample works.

    Max77_0-1692726634692.png

     

     

    After registering the Plug-in I can see this screen

    Max77_1-1692727054252.png

     

    I didn't create the step. It appeared after a few tests and trying to debug in Visual Studio.

     

    I tried to create the step manualy  -> Step creation blocked.

    Max77_2-1692727587393.png

     

    then the registration form became Disabled

    Max77_3-1692727829610.png

    Start Profiling doesn't work as I typed.

     

     

  • Parvez Ghumra Profile Picture
    1,579 Moderator on at

    @Max77 Have you reviewed the known limitations of Custom APIs and suggested workarounds?
    https://learn.microsoft.com/en-us/power-apps/developer/data-platform/custom-api#known-issues-with-custom-apis

  • Verified answer
    a33ik Profile Picture
    3,306 Most Valuable Professional on at

    Ok. Screenshots revealed the mystery. You have to register the plugin step in "Post-Operation" mode to make it "debuggable". Check my article overall - https://butenko.pro/2022/01/03/debugging-custom-api-plugins-using-plugin-registration-tool/ and this screenshot in particular:

    a33ik_0-1692729993424.png

     

  • a33ik Profile Picture
    3,306 Most Valuable Professional on at

    One more thing. You will have to allow steps for your CustomApi:

    a33ik_0-1692730299826.png

     

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard