I am using DI API to add the existing draft AP credit memo to AP credit memo, but it cannot be added and prompts "-1029 [RPC1.AcctCode][line: 1] , 'Field cannot be updated (ODBC -1029)'". I use the function GetByKey to get the document and call the function SaveDraftToDocument to add the document. I do nothing on account code of each line and there is a value of account code on each line. Can anyone tell me what the problem might be?
I have not try to convert the AP CN through this new method.
But I did encounter the same error when creating the AP CN through XML load for Item Type document.
I get by this error by removing the account code before adding the AP CN :
For i as integer = 0 to oDoc.Lines.Count-1
oDoc.oDoc.Lines.AccountCode = ""
If yours is of Item Type also, you might want to try above.
Message was edited by: Edy Simon
On which 882 PL are you running this ?
I have just tried it on 882 PL 8, and it is working fine without having to change anything on the above.
Can you try yours on 882 PL8?
I suspect it is a bug in older PL.
Just FYI, i still found some problem with this method in PL8.
When your price and amount is of 2 decimal digits,
for a certain calculation, you can end up with a discount of 0.01 percent in your line.