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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Dynamics Connector - Custom Adapter problem writing to AX

(0) ShareShare
ReportReport
Posted on by 2

Hi,

Has anyone else attempted to create a custom adapter using the Dynamics Connector SDK, which writes to AX2012?

I have created an adapter which reads XML (based on the sample adapter). I have created a Map which reads the XML and attempts to create an Customer, using the out-of-box 'Conn Customer Org Service'. Currently, upon writing to AX, only a record in the 'CustTable' is being created, despite me adding details to the 'DirOrganisation' in the Map. I have pasted the auto-generated transform code from the map below.

I have also attempted to get around this problem by creating a custom mapping function, which returns a Dictionary<string, object]{} array, but still hit the same problem.

Has anyone successfully created a custom Mapping which writes to AX? Have I missed something in my mapping which creates the link between CustTable and DirOrganisation?

Any help will be much appreciated!

Thanks,

Nick

        private System.Collections.Generic.Dictionary<string, object> _(System.Collections.Generic.Dictionary<string, object> source)
        {
            System.Collections.Generic.Dictionary<string, object> _ = new System.Collections.Generic.Dictionary<string, object>();
            _["Currency"] = ( ((source != null)
            && (source.ContainsKey("Currency") == true)) ? ((string)(source["Currency"])) : default(string) );
            _["CustExcludeCollectionFee"] = Microsoft.Dynamics.Integration.Mapping.Helpers.CrmAx.CrmAx2012Helper.ConvertToYesNoFromBoolean(false);
            _["CustExcludeInterestCharges"] = Microsoft.Dynamics.Integration.Mapping.Helpers.CrmAx.CrmAx2012Helper.ConvertToYesNoFromBoolean(false);
            _["CustGroup"] = ( ((source != null)
            && (source.ContainsKey("CustomerGroup") == true)) ? ((string)(source["CustomerGroup"])) : default(string) );
            _["TaxGroup"] = "DOMVAT";
            List<System.Collections.Generic.Dictionary<string, object>> Organization = new List<System.Collections.Generic.Dictionary<string, object>>();
            Organization.Add(this.Organization_Item(source));
            _["Organization"] = Organization.ToArray();
            return _;
        }
       
        private System.Collections.Generic.Dictionary<string, object> Organization_Item(System.Collections.Generic.Dictionary<string, object> source)
        {
            System.Collections.Generic.Dictionary<string, object> Organization_Item = new System.Collections.Generic.Dictionary<string, object>();
            Organization_Item["NumberOfEmployees"] = 150;
            Organization_Item["OrgNumber"] = "12345678";
            Organization_Item["Name"] = "Test Company Title";
            return Organization_Item;
        }

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Hi Nick, since the AX 2012 adapter is  dynamic and can read / write to the fields that are exposed by a service in AX 2012, I am wondering why you need to create a custom adapter for AX 2012 at all?  The Adapter and object provider that are supplied out of the box *should* be able to accomplish what you need.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Sagar Suman Profile Picture

Sagar Suman 2 Super User 2026 Season 1

#1
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#1
Pratik Bhosle Profile Picture

Pratik Bhosle 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans