Skip to Content
Former Member
Oct 22, 2007 at 03:46 PM

Cannot update sales order link on an activity


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")


SorderNo = oItem.Specific.value - 1

act1.DocType = "17"

If act1.DocEntry = "" Then act1.DocEntry = SorderNo

act1.Details = Remarks


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?