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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Calling DLL inside dynamics ax 2009

(0) ShareShare
ReportReport
Posted on by

Hi All,

    Just want to seek help/advice regarding  calling DLL file inside AX 2009. I tried creating DLL using c#  in .NET Framework 3.5 with Singing details and public    token. I also generate the public token for this DLL using sn command in command prompt. Then I copy the DLL in the bin folder of AX 2009 Client with other standard DLL file like business connector, I registered it in GAC using commands gacutil. Then I tried accessing the custom DLL file in AOT > References but  AX 2009 prompt me an error "INVALID OBJECT NAME". What is this mean?. Another question, why the standard Sharepoint DLL file can't access in AOT> References?

Can anyone give me a step by step process for calling DLL inside AX 2009?

Thanks in Advance. Appreciate every answer.

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    236,394 Most Valuable Professional on at
    Re: Calling DLL inside dynamics ax 2009

    I have a feeling that I've seen the error before, but I can't remember.

    Few things to check:

    1. What is the name of you assembly? Is it a valid AOT node name?
    2. What code throws the error, exactly?
    3. For what processor architecture was the assembly built?

    By the way, if you install an assembly to GAC, you don't have to place it to client\bin. It will be always loaded from GAC.

  • Community Member Profile Picture
    on at
    Re: Calling DLL inside dynamics ax 2009

    Hi sir.

       Thanks for the reply.  

        For questions :

       1.) I use only the name of the class such as (CustomDLL.dll)

            - Can you please give me an example for this so that i know.

       2.)  Actually the error is in referencing the dll file inside dynamics ax. After I add the dll in the AOT>references, ax gives me an error. INVALID OBJECT NAME.

       3.) I use .NET Framework 3.0

  • Community Member Profile Picture
    on at
    Re: Calling DLL inside dynamics ax 2009

    Hi,

    I did not deployed the dll into GAC. I have followed below steps:

    1) Copy dll into "C:\Program Files (x86)\Microsoft Dynamics AX\50\Client\bin"

    2) Right click on reference node and select add reference

    3) Select browse option (by default it will show you above mentioned path if not then browse above path) and locate dll

    4) Click on Open and finally click on OK

    5) Restart AX service

    6) Create instance of class using fully qualified name

    After that you will be able to view the operations mentioned in dll.

    BTW have you tested the custom dll that you built ?

    Thanks

  • Martin Dráb Profile Picture
    236,394 Most Valuable Professional on at
    Re: Calling DLL inside dynamics ax 2009

    rolarte1201 sent me the DLL file so I tested it by myself - I want to share some comments here so the rest of community can see them/participate.

    I had no issues referencing the library. It has been built for .NET Runtime 2.0 and architecture AnyCPU, which is all right. But it's not strongly signed. Rommel, it's not possible to have this assembly in GAC - if you have some there, it's actually another assembly. It's not clear to me what's happening in your environment, but the situation is clearly not exactly what you describe.

    Try to use the assembly in client\bin only or in GAC only, if it makes any difference.

  • Barretao Profile Picture
    80 on at
    RE: Calling DLL inside dynamics ax 2009

    HI,

    Verify the name space of your project in visual studio.

    Use the namespace name of visual studio in in X++ declaration.

    Ex: If the name space in the visual studio be Exemple_NameSpace, in x++ use the same name.

    Example_NameSpace.yourClass  axDllRefenceClass;

  • Community Member Profile Picture
    on at
    RE: Calling DLL inside dynamics ax 2009

    I solved this problem. You need a class or development license in Axapta 2009. I found some where. after that i succeed to install. Then I export reference to xpo. At the end of i import it in X++ i saw in reference list that. You must find Class license.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#3
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans