on 10-05-2012 7:49 AM
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?
Hi Wang,
I hope there is some default value for GL codes set for the documents.
Open the document you are accessing in SBO.
Goto Form Settings, under the document Tab check the GL Account.
I hope this value might be coming over there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
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.Lines.SetCurrentLine(i)
oDoc.oDoc.Lines.AccountCode = ""
Next
If yours is of Item Type also, you might want to try above.
Regards
Edy
Message was edited by: Edy Simon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
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.
Regards
Edy
Hi Wong,
Can you please post your code so we can take a look?
Are you using the draft document to call the GetByKey()?
Documents d = PMXLight.mCompany.GetBusinessObject(BoObjectTypes.oDrafts);
d.GetByKey();
Best regards,
Pedro Magueija
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.