Sales Order Copy between 2 company

fredp1
fredp1 Member Posts: 86
Hi,
I have 1 company that has 700 Open Sales orders that I'd like to copy to another company that has the same setup an no sales orders.
It should have been a simple table copy/paste, but only the Sales Header can be done this way, not the Sales lines cannot.

I'm a end user doing system testing with these orders. (Their are no transactions on these orders)

I was thinking of trying a simple Dataport for Sales Lines.
Is their any simple way to copy these orders?

Thanks

Comments

  • kriki
    kriki Member, Moderator Posts: 9,127
    recSalesHeader.RESET;
    recSalesHeader.SETCURRENTKEY(....);
    recSalesHeader.SETRANGE(...) or SETFILTER(...)
    IF recSalesHeader.FINDSET THEN
      REPEAT
        recSalesHeader2 := recSalesHeader;
        recSalesHeader2.CHANGECOMPANY('The Other Company');
        recSalesHeader2.INSERT(FALSE);
      UNTIL recSalesHeader.NEXT = 0;
    

    And do the same thing for the lines, dimensions and other possible connected tables.

    Of course you need developer license for it.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • davmac1
    davmac1 Member Posts: 1,283
    You could do this with a processing only report. Eliminates the developer license need, but you need a basic knowledge of C/AL and the tables involved.
    Your other option is to pay a developer if you don't have one on staff.
  • themave
    themave Member Posts: 1,058
    As an end user myself, I would go with the dataport route.
    Nice thing about the dataport, is you can try it all you want until it works.
    You use the same dataport to export from one company and into the other, I just cut and paste the dataport so the same one exist in both companies.

    You will need to do the sales header, sales line, and deminisions, not sure if anything else.
  • davmac1
    davmac1 Member Posts: 1,283
    item charges, comments...
  • jannestig
    jannestig Member Posts: 1,000
    I think we are forgetting the DataMigration tool found under Admin > application admin > company setup > datamigration (at least after version 5) I haven't tested it for sales line table but it basics exports an Excel spreadsheet then imports an excel spreedsheet as well.

    no programming experiance is needed, the F1 help should be enough to explain to you how it is used.

    This works with a cronus license so i am assuming its ok for any customer to use as well
  • fredp1
    fredp1 Member Posts: 86
    Hi,

    I ended up with a dataport with some validation on fields and it did the trick.
    I'll see if I can post the dataport.

    Cheers