Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / How to Customise Copil...
Finance forum
Suggested answer

How to Customise Copilot for Dynamics 365 Finance

Posted on by 92
Good day.  We are trying to customise Copilot for D365 Finance.
I am following the tutorial (Tutorial: Create AI plugins for copilots with finance and operations business logic) (https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/copilot/tutorial-create-ai-plugins) to customise Copilot.
Part of the process is to create a class to implements the ICustomAPI.  However I get an error when trying to  create my Deployment Package. 
"D:\a\8\NuGets\Microsoft.Dynamics.AX.Platform.CompilerPackage\DevAlm\Microsoft.Dynamics.Framework.Tools.BuildTasks.targets(85,5): Error : Fatal: dynamics://Class/ACCAICustomAPICalculateCustomerBalance(4,59) - Interface 'ICustomAPI' is not found." On investigation we found the the ICustomAPI is empty.
There is no code just the run method but that is also empty.
 
Do I need to replace this or what am I missing.  Please can you advise.
If anyone has any other tutorial to teach us the correct way or more understandable I would greatly appreciate.
 
Kind regards
Categories:
  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 228,792 Most Valuable Professional on at
    How to Customise Copilot for Dynamics 365 Finance
    Interfaces don't contain code; they just describe what methods (with what parameters etc.) a class needs to have. Implementing an interface means creating a class that declares that it implements the interface. For example:
    class MyAPI implements ICustomAPI
    The compiler checks whether the class has all the methods defined in the interface. In your case, you must implement the run() method, otherwise your class fails to compile.

    The error messages says that the interface wasn't found at all. It suggests that your code can't be compiled by the build server. If you can successfully compile it locally, check the F&O version used by the build agent. You probably have an older version there. The version must be at least 10.0.40 proactive quality update 1 (PQU-1) with platform version 7.0.7279.80.
  • Suggested answer
    How to Customise Copilot for Dynamics 365 Finance
    It's an interface (methods) that you need to implement in classes that implements it. It's supposed to be empty.
     

    Edit: Do as Martin says. Since the compiler is on the D drive, it highly signifies that you are using a hosted agent in Azure. You need to update your pipeline. Since it's splitting again, you might have to follow this guide: Dynamics 365 F&O: 10.0.40 Service Update Split Nuget Package | Software Development & Technology (anthonyblake.github.io)

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,572 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,792 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans