web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Posting documents in intercompany flow

(5) ShareShare
ReportReport
Posted on by 74
Hello, 
 
I'm working on a intercompany process where company A creates a purchase order, and then sends the IC document and generates a sales order in Company B, 
I want when i validate the sales order in Company B for shipment, it automatically post the purchase order of Company A for receiving 
 
I tried with changecompany + using standard purch-post codeunit it didn't work 
I tried also with session.startsession and it didn't work too 
 
Does anyone have any suggestion ? 
Thanks in advance 
 
BC-SAAS
I have the same question (0)
  • Suggested answer
    Vahid Ghafarpour Profile Picture
    12,266 on at
    I'd use IC Outbox/Inbox + IC Transaction Posting Flow instead of direct posting
     
    I believe you problem related to :
    You can send sales and purchase orders and return orders before posting. Invoices and credit memos can't be sent until they're posted.
  • Suggested answer
    OussamaSabbouh Profile Picture
    17,911 Super User 2026 Season 1 on at
    Hello,
    in BC SaaS I would not recommend posting Company A’s purchase order directly from Company B’s sales order posting using ChangeCompany or StartSession; even if you can read/change records across companies, the standard posting routines are not designed to safely post another company’s document inside the same transaction/context, and you can easily hit locking, permissions, commit, posting preview, number series, or inconsistent IC audit issues. The cleaner approach is to keep the IC process standard: post the shipment in Company B, send/accept the IC document/message, then post the receipt in Company A either manually, via Job Queue / background process in Company A, or via an integration/API call that runs in Company A’s company context. If you need full automation, create a custom queue table/event when Company B shipment is posted, then have a job queue in Company A pick it up and run the purchase receipt posting there; that keeps each company posting its own document and avoids cross-company posting problems.
    Regards,
    Oussama Sabbouh
  • Gerardo Rentería García Profile Picture
    27,348 Most Valuable Professional on at

    Hi, good day
    I hope this can help you, and give you some hints.

    Intercompany Transactions in Business Central: How They Work

    Business Central Intercompany – kimdandnavbc.com

    Best Regards
    Gerardo

  • Suggested answer
    YUN ZHU Profile Picture
    102,123 Super User 2026 Season 1 on at
    This is likely a limitation of the ChangeCompany method. I suggest you use a Job Queue for posting, although it's not real-time, it should solve the problem.
     
    Thanks.
    ZHU
  • Suggested answer
    Jainam M. Kothari Profile Picture
    17,024 Super User 2026 Season 1 on at
    Hello,
     
    You can’t reliably auto-post a Purchase Order in another company using Change Company or Session Start Session, as standard posting code units require a proper session and company context; instead, you should decouple the process: when the Sales Shipment is posted in Company B (via event subscriber), identify the related IC Purchase Order in Company A and trigger its receipt posting asynchronously using a safer approach such as a web service/API call, a Job Queue entry, or a custom queue table processed within Company A—this aligns with Business Central best practices, avoids cross-company transaction issues, and ensures stability and consistency.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,496 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 961 Super User 2026 Season 1

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 870 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans