on 05-19-2006 11:34 PM
Hi all,
I'm using DI API to update a DueDate of a journal entry. But when executing the update method i get the following error:
"-10, Invalid Code [JDT1.ContraAct][line: 1], 'XXXXXXXX'" where XXXXXXXX is an account number.
This is my code:
If (oJournalEntry.GetByKey(iTransId)) Then
oJournalEntry.DueDate = Today
If (oJournalEntry.Update <> 0) Then
vCompany.GetLastError(nErr, sErr)
...
End If
End If
The same update can be made in the SBO Application. By the way, I'm using SBO 2005A SP01 PL3. Haven't tried in SP00.
Thanks in advance,
Ian
Hi Ian,
Very strange...
I have tried to reproduce your problem in my machine (B1 version in the about window "2005A (6.80.316) SP:01 PL:03") and it works fine...
Are you sure there is nothing special in your Journal entry regarding the accounts?
My code is:
Dim ret As Integer
Dim je As SAPbobsCOM.JournalEntries
je = pCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)
If (je.GetByKey(76)) Then
je.DueDate = DateTime.Today
ret = je.Update()
If (ret <> 0) Then
MessageBox.Show(pCompany.GetLastErrorDescription())
Return
End If
End If
Where 76 is the number of my last Journal Entry.
???
Regards
Trinidad.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
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.