on 09-21-2005 11:21 AM
Hi All,
I have a form with a UDO linked to it. The add, find and browse part works fine. When I change something on an existing record and press the update key, it does not save it. It works if I change something in the header, but not if I change a value in the matrix. I looked at the MasterDataUDO example, but can still not figure out what the problem is.
Any help appreciated,
Adele.
The table linked to the matrix... are they created as UDO-lines... it should be... else you have to update it yourself...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Everybody,
I am still having this problem. Can anyone give me some insight? The steps that I followed now:
1. Create a UDO (add, update, find, delete and cancel set to true)
2. Master Data object with one table linked as lines
3. Code and Name selected for "Find"
4. Then I create a form with screen painter. I set databinding to tables that are part of the UDO.
5. I set the UDOType on the form.
Now when I open my form it all works 100%. Find, browse and add. After add if I change something in the header part (e.g. Code or Name) and click the update button, it is saved. If I change something in the matrix it is not saved (it looks like it, but when you browse back to the record, it does not get updated).
Your help is appreciated! This is driving me insain. Am I right by saying that the update should work automatically?
Thanks a lot!
Adele
Hi Everybody,
I eventually solved this problem. Thanks to all of you who tried to assist. The problem is that the UDO name MUST be uppercase. I defined a constant for the name as
Private MYUDO As String = "MyUDO"
Everything works 100% except the update part.It also works fine on patches before version 15. Currently testing on PL05.
It only took me about 3 weeks to eventually figure it out Imagine my frustration. I solved it by running a SQL trace when adding through DI and also when running in SBO itself. I then saved the traces to files and compared the 2 versions...
Thanks for your help guys,
Adele
hi.
It is auto in PL:15 version. not in less. In less version, you must catch the default button event and handle the query manually.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
I have figured out that if I register the UDO manually (in SBO) it works perfectly. If not, my update does not work (everything else works). Herewith my code for creating UDO. Can anyone tell me where the problem is? The registration in SBO looks the same of both (manual and auto).
Thanks,
Adele
Dim oUserObjectMD As SAPbobsCOM.UserObjectsMD
oUserObjectMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)
If oUserObjectMD.GetByKey("My_UDO") = 0 Then
oUserObjectMD.Code = "My_UDO"
oUserObjectMD.Name = "My_UDO"
oUserObjectMD.ObjectType = SAPbobsCOM.BoUDOObjType.boud_MasterData
oUserObjectMD.TableName = TForm
oUserObjectMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanFind = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.FindColumns.ColumnAlias = "Code"
oUserObjectMD.FindColumns.Add()
oUserObjectMD.FindColumns.SetCurrentLine(1)
oUserObjectMD.FindColumns.ColumnAlias = "Name"
oUserObjectMD.ChildTables.TableName = TItem
If oUserObjectMD.Add() <> 0 Then
Dim ErrMsg As String
Dim ErrCode As Long
oCompany.GetLastError(ErrCode, ErrMsg)
MessageBox.Show("Error: " & ErrMsg)
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserObjectMD)
oUserObjectMD = Nothing
End If
End If
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserObjectMD)
oUserObjectMD = Nothing
I think this is right. I suppose that you have to "save" your data twice. It probably works like the documents numbering form. Check it out hope it helps
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.