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)

How can we import party relationships

(0) ShareShare
ReportReport
Posted on by 2,114

Hi Techies,

We want to import party relationships in AX, AX->Home->GAB->Relationships.

How can we do this? Is there any DIXF entity available for this?

Any response is appreciated. Thanks in advance!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at

    It is the DirPartyRelationship table, there is a DMFDirPartyRelationship entity out of the box.

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    301,079 Super User 2025 Season 2 on at

    Hi Sangram,

    I have verified AX 2012 R3. In this version there is an entity "Party relationships" available which can be used.

  • Sangram Shinde Profile Picture
    2,114 on at

    Hi Andre and Vilmos,

    Thanks for reply.

    I did check this entity and tested a sample import too. Import result is showing that records are updated but nothing is showing at table and form level. Whereas I checked the target mapping for this entity and found that 'Childparty' and 'ParentParty' are not mapped and neither we able to map them manually- it is showing an error 'Incorrect Assignment'.

    Is this be the issue? there is no child datasource(DirPartyTable) added in AOT query.

    Do I need to write a new method in class to import this?

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    Can you please clarify what are you trying to achieve? What do you want to import and what data do you already have in AX? That table is holding relationships between existing parties, so obviously there must be records already in DirPartyTable, for which you may define who is the parent and the child by DirPartyNumber to connect them.

    This is also a ValidTimeState table, so you must have a value in the valid from date.

    Finally, if you check the table with Table browser, you would notice that for some record types you also need to define a legal entity.

    Check what are you missing compared to similar, already existing records.

  • Sangram Shinde Profile Picture
    2,114 on at

    Hi Vilmos,

    I am trying to import relationships data for parties, for AX navigation-Home->Common->GAB->Edit any party->open Relationships tab inside that. I need to import data here. Fields are 'ID', child party and parent party, these three fields I am passing from the source excel. I think this entity is updating somewhere in organization hierarchies. Yes Vilmos-

  • Sangram Shinde Profile Picture
    2,114 on at

    Ok I will try passing other fields than ID, parent and child party number.

  • Sangram Shinde Profile Picture
    2,114 on at

    We have only three fields to map - ID, Parent and child party. I think I need to write a custom method to insert data. Please suggest.

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    You could provide Hierarchy Name too. Check the DMFDirPartyRelationshipEntityClass class to see how is it being used.

  • Sangram Shinde Profile Picture
    2,114 on at

    Yes Vilmos,

    ID is what the Hierarchy name at staging level. I tried but it's not importing.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,079 Super User 2025 Season 2 on at

    Hi Sangram,

    I have looked at the field mapping in my environment. The field are not mapped because the staging table is expecting a party number where the target should have a reference record ID.

    So, the entity seems to be incomplete. Usually "generate..." functions are used to do this kind of conversion. These are missing on the class DMFDirPartyRelationshipEntityClass. I consider this as a bug.

    You can report this to Microsoft or create generate methods yourself, like:

    public container GenerateChildParty(boolean _stagingToTarget = true)
    {
        DirPartyTable       dirPartyTable;
        DirPartyRecId       partyRecId;
        container           res;
    
        if (_stagingToTarget)
        {
            partyRecId = DirPartyTable::findByNum(entity.ChildPartyNumber);
            res = [partyRecId];
        }
        else
        {
            if (target.ChildPartyNumber)
            {
                dirPartyTable = DirPartyTable::find(target.ChildParty);
    
                res = [dirPartyTable.PartyNumber];
        }
        return res;
    }


    For the other two fields you have to do a similar conversion. Have also a look at an older blog where I have explained more about these generate methods: kaya-consulting.com/change-in-data-import-export-framework-ax-2012-r3

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