Changecompany

CristinaCristina Member Posts: 35
edited 2004-07-23 in Navision Attain
I have a txt file which contains informartion for 2 companies from Navision and I want to imported in one step in both companies (each with his own values) using Validate trriger.

How can I do it? (I've with table.CHANGECOMPANY but when Validate trriger is calles the correlated tables remains on work company)


Cristina

Comments

  • jmjm Member Posts: 156
    Hi Cristina,

    that's not possible.
    But perhaps helps this idea:
    in the import code check if the information is for the actual company, then insert it else skip the information.
    run the import in both companies

    br
    Josef Metz
    br
    Josef Metz
  • Alex_ChowAlex_Chow Member Posts: 5,063
    I heard Navision 4.0 has a intercompany feature and perhaps can be modified to fit your needs.

    But then again, it won't be released until Fall...
  • DenSterDenSter Member Posts: 8,307
    Well it is possible, but it gets complicated quickly.

    When you do a CHANGECOMPANY, you change the company ONLY on the record variable that you call it from. So if you change the company of your record variable and then you validate a field, and in this field there are other record variables, you will run into problems. These other record variables are reading/writing into the current company, because you did not change the company.

    The solution is either the previous suggestion (only running the values for the current company, but do this for each company) or...

    You can set values without field validation, and if you really need field validation, you copy the code from the field validation into your code, makin sure that you change the company for each record type variable.

    hth
Sign In or Register to comment.