We are working on an intercompany project expense scenario in D365 Finance and need technical (X++) guidance.
Requirement:
Expense attachments (receipts) must be available on posted transactions
Specifically for project costs / intercompany flow
Not only on expense report or invoice headers
What we tried:
Copied attachments during ProjCostTrans creation
Used CoC on createProjCostTrans / project posting logic
However, later the system creates a vendor invoice for the intercompany flow, and attachments do not persist there
At this point:
ProjCostTrans exists
Vendor invoice exists
Attachments are lost or not traceable reliably
Has anyone implemented attachment handling for posted intercompany project costs?
Where is the right extension point in X++?
Should this be handled only at ProjCostTrans, or again during vendor invoice creation?
Any working pattern / supported approach would be very helpful
If someone has solved this already, please share the approach or reference.