cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Max77
Resolver I
Resolver I

How to debug Custom API (unbound action)?

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.

1 ACCEPTED SOLUTION

Accepted Solutions
a33ik
Most Valuable Professional
Most Valuable Professional

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

 

View solution in original post

9 REPLIES 9
Fubar
Multi Super User
Multi Super User

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

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
Resolver I
Resolver I

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?

parvezghumra
Super User
Super User

@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

 



Parvez Ghumra, XRM Solutions UK
Microsoft Power Platform | Dynamics 365 CE/CRM | Azure - Developer | Technical Consultant | Technical Architect
Power Apps Community Super User | Blogger

If this response helped you in any way, please give kudos by clicking the 'Thumbs Up'/'Like' button and/or marking it as an 'Accepted Solution'. This helps others by providing a quick way to identify likely solutions to their issues.

Also, for more useful content, please free to add me as a friend on this forum, follow my blog, follow me on Twitter and connect with me on LinkedIn

a33ik
Most Valuable Professional
Most Valuable Professional

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.

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

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.

 

 

parvezghumra
Super User
Super User

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



Parvez Ghumra, XRM Solutions UK
Microsoft Power Platform | Dynamics 365 CE/CRM | Azure - Developer | Technical Consultant | Technical Architect
Power Apps Community Super User | Blogger

If this response helped you in any way, please give kudos by clicking the 'Thumbs Up'/'Like' button and/or marking it as an 'Accepted Solution'. This helps others by providing a quick way to identify likely solutions to their issues.

Also, for more useful content, please free to add me as a friend on this forum, follow my blog, follow me on Twitter and connect with me on LinkedIn

a33ik
Most Valuable Professional
Most Valuable Professional

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

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

a33ik_0-1692730299826.png

 

Helpful resources

Announcements

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Tuesday Tip: Community User Groups

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   Today's Tip: Community User Groups and YOU Being part of, starting, or leading a User Group can have many great benefits for our community members who want to learn, share, and connect with others who are interested in the Microsoft Power Platform and the low-code revolution.   When you are part of a User Group, you discover amazing connections, learn incredible things, and build your skills. Some User Groups work in the virtual space, but many meet in physical locations, meaning you have several options when it comes to building community with people who are learning and growing together!   Some of the benefits of our Community User Groups are: Network with like-minded peers and product experts, and get in front of potential employers and clients.Learn from industry experts and influencers and make your own solutions more successful.Access exclusive community space, resources, tools, and support from Microsoft.Collaborate on projects, share best practices, and empower each other. These are just a few of the reasons why our community members love their User Groups. Don't wait. Get involved with (or maybe even start) a User Group today--just follow the tips below to get started.For current or new User Group leaders, all the information you need is here: User Group Leader Get Started GuideOnce you've kicked off your User Group, find the resources you need:  Community User Group ExperienceHave questions about our Community User Groups? Let us know! We are here to help you!

Super User of the Month | Ahmed Salih

We're thrilled to announce that Ahmed Salih is our Super User of the Month for April 2024. Ahmed has been one of our most active Super Users this year--in fact, he kicked off the year in our Community with this great video reminder of why being a Super User has been so important to him!   Ahmed is the Senior Power Platform Architect at Saint Jude's Children's Research Hospital in Memphis. He's been a Super User for two seasons and is also a Microsoft MVP! He's celebrating his 3rd year being active in the Community--and he's received more than 500 kudos while authoring nearly 300 solutions. Ahmed's contributions to the Super User in Training program has been invaluable, with his most recent session with SUIT highlighting an incredible amount of best practices and tips that have helped him achieve his success.   Ahmed's infectious enthusiasm and boundless energy are a key reason why so many Community members appreciate how he brings his personality--and expertise--to every interaction. With all the solutions he provides, his willingness to help the Community learn more about Power Platform, and his sheer joy in life, we are pleased to celebrate Ahmed and all his contributions! You can find him in the Community and on LinkedIn. Congratulations, Ahmed--thank you for being a SUPER user!  

Tuesday Tip: Getting Started with Private Messages & Macros

Welcome to TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   This Week's Tip: Private Messaging & Macros in Power Apps Community   Do you want to enhance your communication in the Community and streamline your interactions? One of the best ways to do this is to ensure you are using Private Messaging--and the ever-handy macros that are available to you as a Community member!   Our Knowledge Base article about private messaging and macros is the best place to find out more. Check it out today and discover some key tips and tricks when it comes to messages and macros:   Private Messaging: Learn how to enable private messages in your community profile and ensure you’re connected with other community membersMacros Explained: Discover the convenience of macros—prewritten text snippets that save time when posting in forums or sending private messagesCreating Macros: Follow simple steps to create your own macros for efficient communication within the Power Apps CommunityUsage Guide: Understand how to apply macros in posts and private messages, enhancing your interaction with the Community For detailed instructions and more information, visit the full page in your community today:Power Apps: Enabling Private Messaging & How to Use Macros (Power Apps)Power Automate: Enabling Private Messaging & How to Use Macros (Power Automate)  Copilot Studio: Enabling Private Messaging &How to Use Macros (Copilot Studio) Power Pages: Enabling Private Messaging & How to Use Macros (Power Pages)

April 4th Copilot Studio Coffee Chat | Recording Now Available

Did you miss the Copilot Studio Coffee Chat on April 4th? This exciting and informative session with Dewain Robinson and Gary Pretty is now available to watch in our Community Galleries!   This AMA discussed how Copilot Studio is using the conversational AI-powered technology to aid and assist in the building of chatbots. Dewain is a Principal Program Manager with Copilot Studio. Gary is a Principal Program Manager with Copilot Studio and Conversational AI. Both of them had great insights to share with the community and answered some very interesting questions!     As part of our ongoing Coffee Chat AMA series, this engaging session gives the Community the unique opportunity to learn more about the latest Power Platform Copilot plans, where we’ll focus, and gain insight into upcoming features. We’re looking forward to hearing from the community at the next AMA, so hang on to your questions!   Watch the recording in the Gallery today: April 4th Copilot Studio Coffee Chat AMA

Tuesday Tip: Subscriptions & Notifications

TUESDAY TIPS are our way of communicating helpful things we've learned or shared that have helped members of the Community. Whether you're just getting started or you're a seasoned pro, Tuesday Tips will help you know where to go, what to look for, and navigate your way through the ever-growing--and ever-changing--world of the Power Platform Community! We cover basics about the Community, provide a few "insider tips" to make your experience even better, and share best practices gleaned from our most active community members and Super Users.   With so many new Community members joining us each week, we'll also review a few of our "best practices" so you know just "how" the Community works, so make sure to watch the News & Announcements each week for the latest and greatest Tuesday Tips!   This Week: All About Subscriptions & Notifications We don't want you to a miss a thing in the Community! The best way to make sure you know what's going on in the News & Announcements, to blogs you follow, or forums and galleries you're interested in is to subscribe! These subscriptions ensure you receive automated messages about the most recent posts and replies. Even better, there are multiple ways you can subscribe to content and boards in the community! (Please note: if you have created an AAD (Azure Active Directory) account you won't be able to receive e-mail notifications.)   Subscribing to a Category  When you're looking at the entire category, select from the Options drop down and choose Subscribe.     You can then choose to Subscribe to all of the boards or select only the boards you want to receive notifications. When you're satisfied with your choices, click Save.   Subscribing to a Topic You can also subscribe to a single topic by clicking Subscribe from the Options drop down menu, while you are viewing the topic or in the General board overview, respectively.     Subscribing to a Label Find the labels at the bottom left of a post.From a particular post with a label, click on the label to filter by that label. This opens a window containing a list of posts with the label you have selected. Click Subscribe.           Note: You can only subscribe to a label at the board level. If you subscribe to a label named 'Copilot' at board #1, it will not automatically subscribe you to an identically named label at board #2. You will have to subscribe twice, once at each board.   Bookmarks Just like you can subscribe to topics and categories, you can also bookmark topics and boards from the same menus! Simply go to the Topic Options drop down menu to bookmark a topic or the Options drop down to bookmark a board. The difference between subscribing and bookmarking is that subscriptions provide you with notifications, whereas bookmarks provide you a static way of easily accessing your favorite boards from the My subscriptions area.   Managing & Viewing Your Subscriptions & Bookmarks To manage your subscriptions, click on your avatar and select My subscriptions from the drop-down menu.     From the Subscriptions & Notifications tab, you can manage your subscriptions, including your e-mail subscription options, your bookmarks, your notification settings, and your email notification format.     You can see a list of all your subscriptions and bookmarks and choose which ones to delete, either individually or in bulk, by checking multiple boxes.     A Note on Following Friends on Mobile Adding someone as a friend or selecting Follow in the mobile view does not allow you to subscribe to their activity feed. You will merely be able to see your friends’ biography, other personal information, or online status, and send messages more quickly by choosing who to send the message to from a list, as opposed to having to search by username.

Users online (5,276)