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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

HcmServices service code gives error

(0) ShareShare
ReportReport
Posted on by

Hello,

I am trying to create employees in AX using HcmServices.  When I create a simple .NET application and add a service reference to http://localhost:8101/DynamicsAx/Services/HCMServices, the proxy code is generated but it appears to contain two definitions of a class called CallContext.  When I try to build the solution, I get these errors:

Error 1

The type 'ConsoleApplication1.MyHcmServices.CallContext' already contains a definition for 'Company'

Error 2

The type 'ConsoleApplication1.MyHcmServices.CallContext' already contains a definition for 'Language'

Error 3

The type 'ConsoleApplication1.MyHcmServices.CallContext' already contains a definition for 'LogonAsUser'

Error 4

The type 'ConsoleApplication1.MyHcmServices.CallContext' already contains a definition for 'MessageId'

Error 5

The type 'ConsoleApplication1.MyHcmServices.CallContext' already contains a definition for 'PartitionKey'

Error 6

The type 'ConsoleApplication1.MyHcmServices.CallContext' already contains a definition for 'PropertyBag'

Error 7

The type 'ConsoleApplication1.MyHcmServices.CallContext' already contains a definition for 'PropertyChanged'

Error 8

Type 'ConsoleApplication1.MyHcmServices.CallContext' already defines a member called 'RaisePropertyChanged' with the same parameter types

I can comment or delete the definition of one of these CallContext classes in the Reference.cs file that is generated and my solution will successfully compile.  Has anyone run into this problem? 

*This post is locked for comments

I have the same question (0)
  • David Hand Profile Picture
    on at

    Were you able to find a solution to this problem, without needing to delete the definition manually in the cs file? I'm seeing the exact same problem at one of my implementations.  Thanks!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans