Repository navigation
Document SAP B1 fields the Service Layer rejects - #1476
Merged
Merged
Conversation
Payments have no DocTotal or header CheckSum, journal entry lines cannot be filtered with lambdas or selected by sub-field, and the chart of accounts has no Postable field. Drop CheckSum from the payment select example and tell the model to match many amounts in one read.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Production use of the SAP Business One adapter (B1 10.0 FP 2511, Service Layer v2) showed the model repeatedly sending fields and filters the Service Layer rejects with
400:VendorPayments/IncomingPayments:DocTotaland headerCheckSumdo not exist ("Property 'CheckSum' of 'Payment' is invalid"). Our ownselectexample suggestedCheckSum. Cheque amounts are inPaymentChecks.JournalEntries:UserSign,StornoToTransId,UpdateDatedo not exist;$select=JournalEntryLines/AccountCodefails ("Invalid navigation property"); lambda filtersJournalEntryLines/any(...)fail ("Invalid symbol in the filter condition").ChartOfAccounts:Postable,PostingMode,ControlAccountdo not exist; postable accounts areActiveAccount eq 'tYES'.The model also matched bank statement amounts by calling
b1_list_vendor_paymentsonce per amount (hundreds of calls, ~85% empty). The instructions and the payment tool descriptions now say to read the date window once and match locally.Changes are text only (instructions, tool and parameter descriptions); no tool names, paths or parameters change. Behaviour is the same in Cloud and self-hosted.
Test plan
Run from the repository root and
packages/backend:node scripts/validate-adapters.mjs --warn: 708 passed, 0 failed.de/sap-business-one.jsononly has the existingtool-prefixwarnings (tool names unchanged).node scripts/regenerate-catalog.mjs: no diff incatalog.ts.npx jest src/adapters/de/sap-business-one.live.spec.ts --maxWorkers=2: passed (live calls skipped).catalog.spec.ts/catalog-summary.spec.tscould not run locally: the borrowednode_moduleshad a Prisma client generated for another schema (TS2339 onPrismaService), unrelated to this change. CI runs them.