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)

not able to access X++ table method in EP

(0) ShareShare
ReportReport
Posted on by

Hello,

I have created a method in table CaseDetailBase. it's public static method.

I am trying to access in EP usercontrol ascx.cs file as shown below. but it's not showing in intellisense.

Microsoft.Dynamics.Portal.Application.Proxy.CaseDetailBase.method1

It means it's not available to EP yet. I generated incremental CIL after adding this method. but still the issue persists.

How to make it available in EP?

Please guide. Thanks.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    Have you actually created and deployed the proxy? If not, it obviously doesn't exist. Please refer to Proxies [AX 2012] for details.

  • Community Member Profile Picture
    on at

    Hi Martin,

    Thanks for reply.

    3 standard methods find, finRec and setDocumentstatus are already appearing in VS.

    i just created 1 new static method and generated CIL. Do i need to build proxy for this 1 method?

  • Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    What you're trying to use is a .NET proxy class, not the X++ class. And the proxy class obviously hasn't been updated after adding the method. You need to rebuild the project containing the proxy class. Unfortunately I don't know which one it is (without looking into AX) - try EPApplicationProxies project.

  • Community Member Profile Picture
    on at

    Hi Martin,

    After building both proxy projects  EPApplicationProxies & EPApplicationProxies1 , it started showing my method 1.

    but now i am facing compilation error because of the first parameter i am passing as this.AxSession.AxaptaAdapter  to that method from EP codebehind.

    it says 'No overload for method 'method1' takes 5 arguments.  

    I have 4 Arguments defined in Method at AX table. and i am passing 1st extra parameter as AXaptaAdapter.

    And the catch here is, if i don't pass AxaptaAdapter as 1st arugment, still it gives 2 compile errors

    ------------------------------------------------------------------------------------------

    Error 95 The best overloaded method match for 'Microsoft.Dynamics.Portal.Application.Proxy.EP.createDocuRef(Microsoft.Dynamics.Portal.Application.Proxy.DocuRef)' has some invalid arguments

    ------------------------------------------------------------------------------------------

    Error 96 Argument 1: cannot convert from 'Microsoft.Dynamics.Framework.BusinessConnector.Adapter.IAxaptaRecordAdapter' to 'Microsoft.Dynamics.Portal.Application.Proxy.DocuRef'

    -----------------------------------------------------------------------------------

    Here it tries to convert first argument to IAxaptaAdapter and failing to convert it.

    what am I missing here or doing wrong ? please suggest.

  • Verified answer
    Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    Review expected types in IntelliSense tooltip or by opening method definition; review types of arguments statically or in debugger. Then find those that aren't compatible and use correct types.

    The particular error you mentioned says that createDocuRef() expects one parameter of type DocuRef, but you're passing IAxaptaRecordAdapter, which isn't compatible. It seems to me that you're mixing proxy classes with old Business Connector classes. Use correct types and everything should work.

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans