Running a post codeunit from company A to company B

sabzamsabzam Member Posts: 1,149
Dear All,

is it possible in some way or another to run the a codeunit in company B from company A. For example whenever I click post batch in the Sales Invoices in Company A automatically even the sales invocies in company B are posted.

Comments

  • matttraxmatttrax Member Posts: 2,309
    Check out the topics on Intercompany Posting. You'll want to use the CHANGECOMPANY function.
  • DenSterDenSter Member Posts: 8,305
    CHANGECOMPANY is not your answer for posting, it's just too much code. You will need to develop something more robust than that.
  • idiotidiot Member Posts: 651
    I got a requirement for something similar to that line...
    A report needs to be generated for each company after its office hours.
    If there are 10 companies, using Job scheduler it will take up 10 use licenses if CHANGECOMPANY cannot be used as each company will need to be opened to run the report.
    The current workaround is to schedule a downtime to backup the database to another location & generate the reports from the backup, which is not the way to go...
    Any suggestions?
    NAV - Norton Anti Virus

    ERP Consultant (not just Navision) & Navision challenger
  • ara3nara3n Member Posts: 9,256
    reading data from other companies is fine. It's writing and running business logic that does not work.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • idiotidiot Member Posts: 651
    Some of the reports included statements or invoices which are not pure reads :)
    NAV - Norton Anti Virus

    ERP Consultant (not just Navision) & Navision challenger
  • DenSterDenSter Member Posts: 8,305
    There's a thing in the download section that allows you to run one instance of NAS for multiple companies. I don't know how it works, but I remember people being very positive about it.

    Like Rashed said, reading data using CHANGECOMPANY is not a problem, processing data using CHANGECOMPANY is possible but the more stuff you need to do the more difficult it becomes.
  • ara3nara3n Member Posts: 9,256
    Here is a link to Download the Modification.

    http://www.mibuso.com/dlinfo.asp?FileID=810
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • idiotidiot Member Posts: 651
    What if there's no NAS?
    NAV - Norton Anti Virus

    ERP Consultant (not just Navision) & Navision challenger
  • ara3nara3n Member Posts: 9,256
    you get a free license for NAS, so there is always NAS.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.