Posting a journal from another company

iqbalmadiqbalmad Member Posts: 179
Hi all,

Can someone help.
Is there anything i need to change to make it work?


GenJnlLine2.CHANGECOMPANY(Company Name);
GenJnlLine2.SETFILTER("Journal Template Name", 'GENERAL');
GenJnlLine2.SETFILTER("Journal Batch Name", 'DEFAULT");
GenJnlPost.Run(GenJnlLine2);

Comments

  • davmac1davmac1 Member Posts: 1,283
    Changecompany only affects the table variable in the object you are in.
    To make posting journals work across companies would be a huge amount of work.

    Why are you wanting to do this?
    If you want to write journals from one company to another, you need to then kick off a process that is logged into that company like a job queue or web process.
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    This behaviour is mentioned in the on-line help for CHANGECOMPANY:
    This example shows that CHANGECOMPANY only changes the company on a data level. Triggers and functions will still run in the context of the current company.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • iqbalmadiqbalmad Member Posts: 179
    Hi davmac1,
    if i need to do it through a job queue or web process, where can i get help to perform this on NAV 2013?
  • davmac1davmac1 Member Posts: 1,283
    Take a look at this link:
    http://mibuso.com/blogs/ara3n/2009/01/28/running-job-queue-through-nav-web-service-for-unlimited-companies/
    If you need more help, then I recommend contacting your partner if you are an end user or the author if you are a partner.
Sign In or Register to comment.