Skip to main content

Notifications

Community site session details

Community site session details

Session Id : nml1q1IU1G+TrM4JqKjpJ9
Power Apps - Microsoft Dataverse
Answered

How to debug Custom API (unbound action)?

Like (0) ShareShare
ReportReport
Posted on 21 Aug 2023 11:26:32 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.

  • a33ik Profile Picture
    3,304 Most Valuable Professional on 22 Aug 2023 at 18:51:56
    Re: How to debug Custom API (unbound action)?

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

    a33ik_0-1692730299826.png

     

  • Verified answer
    a33ik Profile Picture
    3,304 Most Valuable Professional on 22 Aug 2023 at 18:46:40
    Re: How to debug Custom API (unbound action)?

    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

     

  • Parvez Ghumra Profile Picture
    1,579 Super User 2025 Season 1 on 22 Aug 2023 at 18:31:48
    Re: How to debug Custom API (unbound action)?

    @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

  • Max77 Profile Picture
    264 on 22 Aug 2023 at 18:12:56
    Re: How to debug Custom API (unbound action)?

    @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.

     

     

  • a33ik Profile Picture
    3,304 Most Valuable Professional on 22 Aug 2023 at 15:49:11
    Re: How to debug Custom API (unbound action)?

    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.

  • Parvez Ghumra Profile Picture
    1,579 Super User 2025 Season 1 on 22 Aug 2023 at 11:12:40
    Re: How to debug Custom API (unbound action)?

    @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

     

  • Max77 Profile Picture
    264 on 22 Aug 2023 at 08:55:11
    Re: How to debug Custom API (unbound action)?

    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?

  • a33ik Profile Picture
    3,304 Most Valuable Professional on 22 Aug 2023 at 03:00:35
    Re: How to debug Custom API (unbound action)?

    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.

  • Fubar Profile Picture
    7,854 Super User 2025 Season 1 on 21 Aug 2023 at 23:14:01
    Re: How to debug Custom API (unbound action)?

    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.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

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

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
ankit_singhal Profile Picture

ankit_singhal 2 Super User 2025 Season 1

#1
SadFox Profile Picture

SadFox 2

#1
CU06052020-0 Profile Picture

CU06052020-0 2

Overall leaderboard

Featured topics