on 10-22-2007 4:46 PM
I have an addon that creates CRM activities after an order has been updated. This is working fine in the SBODemo_UK database but fails when I run it against a customer database. An extract of the code is: -
oItem = oForm.Items.Item("8")
act1.GetByKey(ActKey)
SorderNo = oItem.Specific.value - 1
act1.DocType = "17"
If act1.DocEntry = "" Then act1.DocEntry = SorderNo
act1.Details = Remarks
act1.Update()
GetDIConnection.GetLastError(nErr, errMsg)
If (nErr <> 0) Then
SBO_Application.MessageBox("Failed to update order activity " & errMsg)
End If
This code is executed after the order has been updated and I have verified this by stopping the code at the start of the section above and used Enterprise manager to see that the order has hit the database.
The only difference that I can see between the two databases is their size with the customer database having 5000 orders in it. I wondered if there was some sort of delay in the SDK seeing the new order being added because of the size of the database but I deleted all but 200 orders and still have the problem.
Does anyone have any ideas?
Gordon,
Is there a difference between the version of SAP Business One you are using and what the client it using ... including the patch level? If it works successfully with the Demo database it should also work in a production database.
Eddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Edward,
not only are the systems the same I am running the databases on the same machine which is my development laptop. I have just created a database from scratch and installed my addin and it works OK there. The addin auto creates the fields and tables required so it should be doing the same for all databases that I install it to.
Gordon
What version and patch are you on?
I have encountered issues with the getbykey when the source of the order is a duplicated document. When the order is created from scratch getbykey works fine.
I only get this in 2007 though...
Message was edited by:
John O'Neill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
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.