Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Importing Purchase agreements using Excel Add ins

Posted on by Microsoft Employee

Hi 

I am trying to import purchase agreements using Excel add in.   I have used "AgreementLine" and "PurchAgreementHeader" tables.I am getting the below error

Field 'Agreement header record ID' must be filled in.
Function AgreementHeader.getModuleType has been incorrectly called.
Document Generic document could not be created. Error details: Function AgreementHeader.getModuleType has been incorrectly called.

I couldn't find the field Agreement header record ID in the tables that I am using for the import. I have added all the fields relevant to  'Agreement header record ID' like 'Agreement header record ID.Name, Document title' but still I am facing the issue.
Could you please add your inputs to figure out the issue.

Thanks

*This post is locked for comments

  • syed baber Profile Picture
    syed baber 11,627 on at
    RE: Importing Purchase agreements using Excel Add ins

    Hi Siva,

    In DIXF user guide, below statement is mentioned:

    The wizard can be used to create custom entities that are associated only with tables that do not inherit data structures from other tables.

    Here is the link where you can find the complete details:

    technet.microsoft.com/.../jj933277.aspx

    Have you used the create custom entity wizard to create a custom entity?

    Thanks,

    Baber.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Importing Purchase agreements using Excel Add ins

    Hi Andre,


    I have created a custom entity to import Purchase Agreements. I have used PurchAgreementHeader Table for this. As PurchAgreementHeader is inherited from Agreementheader table and PurchAgreementHeader doesn't have DefaultAgreementLineType field. I  have added it my staging table and its reflecting in query as well. When I run the data copying to target its not getting updated in PurchAgreementHeader  table. What could be the reason. Same thing is happening with Agreementclassification field. 

    And on the select entities for processing group form when I click ViewTargetMapping its not opening any thing. Could you please add your inputs on this.

    Thanks

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Importing Purchase agreements using Excel Add ins

    Hi Baber/Andre

    Did you do this import before, can u please suggest me what are the tables I should use and the type of entity to be  created?

  • Suggested answer
    syed baber Profile Picture
    syed baber 11,627 on at
    RE: Importing Purchase agreements using Excel Add ins

    Hi Siva,

    I can't see any out of the box entity for purchase agreements in DIXF. So yes, you need to create a custom entity for this.

    Thanks,

    Baber.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Importing Purchase agreements using Excel Add ins

    Hi Andre,

    Do we have a out of box entity for importing Purchase agreements or we need to create a custom entity using AgreementHeader and Agreementline tables.

    Thanks

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Importing Purchase agreements using Excel Add ins

    Hi Andre,

    Do we have a out of box entity for importing Purchase agreements or we need to create a custom entity using AgreementHeader and Agreementline tables.

    Thanks

  • Suggested answer
    syed baber Profile Picture
    syed baber 11,627 on at
    RE: Importing Purchase agreements using Excel Add ins

    Hi Siva,

    As Andre mentioned, use the data import export framework to import purchase agreement, this will auto populate the record Id field from agreement header record.

    Thanks

    Baker.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    RE: Importing Purchase agreements using Excel Add ins

    Hi Siva,

    This field is one of the key fields of the agreement lines table. If you can't find it, probably it is a hidden field. You can check it in the development environment.

    Maybe you can better use Data import/export framework for this.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans