web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to Customise Copilot for Dynamics 365 Finance

(1) ShareShare
ReportReport
Posted on by 269
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
I have the same question (0)
  • Suggested answer
    Jonas "Jones" Melgaard Profile Picture
    5,016 Most Valuable Professional on at
    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)
  • Verified answer
    Martin Dráb Profile Picture
    240,521 Most Valuable Professional on at
    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.
  • Sophs@4Sight Profile Picture
    269 on at
    Good day Martin & Jonas 
     
    Thank you for the responses, it helped resolve our issue of the pipeline build error. It was in fact the F&O version used by the build agent. Once this was fixed the error did not occur. 
     
    I do however have another question regarding the tutorial mentioned (https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/copilot/tutorial-create-ai-plugins). I was able to follow the steps up until step 2, I am able to see the class in F&O (Synchronize Dataverse Custom APIs) and view the API in dataverse. However on step 3 I am unable to add the plugin as an action on my copilot. The option for this is disabled. I am following the exact tutorial as above. Any advice on what I could be missing? Thank you in advance
  • Martin Dráb Profile Picture
    240,521 Most Valuable Professional on at
    It's great to hear that your question has been resolved. Please create a new thread for your new question; it makes it easier to follow which question is discussed and whether it has been answered. Also, please use thread titles describing the particular topic; the current one is too generic.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
SajeedMullaji Profile Picture

SajeedMullaji 760

#2
Martin Dráb Profile Picture

Martin Dráb 330 Most Valuable Professional

#3
CU10121822-0 Profile Picture

CU10121822-0 310

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans