on 08-29-2013 5:07 PM
Hi ,
I used SDK to add a marketing document like this:
lRetCode = oDraft.Add
If lRetCode <> 0 Then
oCompany.GetLastError(lRetCode, sErrMsg)
End if
And I received sErrMsg="No matching records found (ODBC -2028)". I can found Item doesn't exist manually . But with document have too many lines, how can I check it? Can I use SDK to get exactly error line ?
Hi Sancti,
This is a common problem with the error reporting system of B1, both in the client and with the SDK.
With the SDK we work around this problem by simply performing our own prechecks before adding a cardcode or an item to the document.
You can use a function with a query, or you can use the Item or BusinessPartner object's GetByKey method. Either way, you should check that the item exists, if it is frozen, and if there is a price for the given cardcode. And you can check for any other rules that you may have.
Regards,
Johan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sancti,
I think SDK does not provide the exact line number. I'd suggest you make function that checks if the item already exists and a counter for its line number. This way, you'd get the exact item which caused the 'No match' error.
Regards,
Ariel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sancti,
The same as this error message in the Application.
No it does not show you which line.
Regards
Edy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
11 | |
10 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.