I’m currently working on an OData integration where I have a mapping sheet with an entity name and the corresponding fields required for the integration. The issue I’m facing is with the SalesInvoiceHeaderV4 entity, which uses CustInvoiceJour as its data source. The standard SalesInvoiceHeaderV4 entity, however, only contains a few fields, while several important fields are missing, such as:
- Purchase Order
- Invoicing Name
- VAT Number
- Sales Balance
- Sum TaxMST
- Payment Due Date
- Customer Reference
- Invoice Round Off
These fields are available in the CustInvoiceJour table, which is used as a data source for the entity. Additionally, fields from TaxTrans and CustInvoiceTrans, as well as the SalesInvoiceLineV4 entity, are needed.
What I’ve Tried:
I attempted to resolve the issue by extending the SalesInvoiceHeaderV4 entity and copying the missing fields. I also extended the staging table and added the new fields to it. However, after building and syncing the project, I encountered an error in the staging table code, stating that there’s an instance method that is inaccessible.
Question:
- How should I go about customizing the standard SalesInvoiceHeaderV4 entity to include these missing fields?
- Is there a better way to handle extending the staging table to avoid the instance method error?
Any guidance or best practices for this scenario would be greatly appreciated. Thank you!