Problems with validating dimension on xml import

KisuKisu Member Posts: 381
Heyas,
I'm having problem validating Global dimension 1 and 2 when I'm importing xml file

I have xml port that imports one xml file to multiple purchase invoices header and line data, but.
When the import reaches dimension 1 and 2 it does not validate them.

I'm not sure how should I put the code in as if I validate that then some other fields say that there is no line to put the data.

I tryed to first insert the line but then when I try to modify that again it says there is no such line, so it does not find the inserted line anymore.

I can get all header data validated in, the problem is just with these line data.

I tryed to bring all lines first and then modify but that does not help at all either

Could someone help me with this a little?
K.S.

Comments

  • David_SingletonDavid_Singleton Member Posts: 5,479
    I always bring in the XML file into a holding table (a temp table on the purchase header and line does fine) without validation, then once the xml is in the temp table I then do the creation of the normal tables. I have seen quite a few people do this, so I assume its a pretty standard way of doing it.

    The advantage is that you then have control of exactly when all the validations are being called.
    David Singleton
  • KisuKisu Member Posts: 381
    I always bring in the XML file into a holding table (a temp table on the purchase header and line does fine) without validation, then once the xml is in the temp table I then do the creation of the normal tables. I have seen quite a few people do this, so I assume its a pretty standard way of doing it.

    The advantage is that you then have control of exactly when all the validations are being called.

    Hmm that is very great idea, thanks bud :)
    Gonna do some tests..
    K.S.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Kisu wrote:
    Hmm that is very great idea, thanks bud :)
    Gonna do some tests..

    You're welcome.
    David Singleton
  • austinaustin Member Posts: 191
    a temp table on the purchase header and line does fine


    I would like to know here what is meant by temp table in this case ?

    Could you explain in detail sir ?
  • David_SingletonDavid_Singleton Member Posts: 5,479
    austin wrote:
    a temp table on the purchase header and line does fine


    I would like to know here what is meant by temp table in this case ?

    Could you explain in detail sir ?


    Temp Tables are a very basic part of Navision development and C/AL. You should not be even thinking of XML ports if you don't yet know Temp Tables, so learn them first.

    Search the forum to learn more.
    David Singleton
  • austinaustin Member Posts: 191
    Thanks David,

    Generally what we do is directly we will import the data in to Direct tables thorugh data port ( Like Purchase Header , Purchase line , Item Journal...sales Header , sales Line).

    But you say dont import in to Direct tables , just import into Temporary tables , then transfer to actual tables.

    this is i did not understand , so could u explain in detail.
Sign In or Register to comment.