on 12-16-2004 12:27 PM
Hi,
we wanted to know if there's a possibility to gain access to a user defined object (UDO) via the DI Api. We wondered if there might be a way to handle UDOs similar to BO system objects, that is to say by requesting a reference using the 'GetBusinessObject' method in order to manipulate them within the source code.
As far as we know yet, the only possibility to perform changes on a UDO is by using the form user interface.
Regards,
Jürgen
Have a look at the UserObjectsMD, it should provide the functionality you're expecting.
From DI help file:
UserObjectsMD is a non-business object that represents the registration data settings, such as table name and supported services, of a user defined object.
This object enables you to:
Add a user define object.
Retrieve a user define object by its key.
Update a user define object .
Remove a user define object from the database
Save the object in XML format.
Source table: OUDO.
Florian Zeller
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately you do not get a UserObject/UDO as object-reference using the UserObjectsMD (in C#), you only get the properties of the UDO.
As the UDOs seem to be intended to be the user-alternative to the business-objects like BPBankAccounts one would expect to be able to get/create a UDO-reference. Now the UDOs seem to work inaccessible in the background.
Ch. Becker
The UserObjectsMD object simply seems to be a meta-data object which contains information about the udo's structure (tables, types, etc..).
My question is how can I retrieve a certain record from the udo using the DI Api?
As Florian mentioned correctly the help files anounce the retrieval of a user defined object by its key using the UserObjectsMD object. But I think this is somehow misleading because you can't retrieve the user object itself (like you can using system business objects) but the meta-data which describes the object.
Perhaps, somebody came across the same problem and found a solution.
Regards,
Jürgen
Hi,
Accessibility to UDOs via DI API - besides their definitions by using UserObjectsMD - is planned for version 2005.
Until then you could use RecordSet for reading purposes (but just for that!!! because of the numerous internal fields contained in a UDO table).
The UserTable object (which represents a record in a user-defined table - just in case you didn't notice yet) for writing, unfortunately does not support working with UDO tables.
So, waiting for version 2005 (supposed to be available somewhen around the middle of 2005) is the only true option, if you cannot use the UDO inside SAP Business One UI.
Regards,
Frank
So it is either rearranging all tables a way they match into the "Master Data/Document Data Table refers to Lines Table"-schema or sticking to the old way: "RecordSet + UserTables" for accessing and displaying data different from the above scheme? For example displaying a Lines Table in a form on its own?
Nothing in between yet, except maybe manipulating on UI-API-level?
Right.
Data migration from existing UDTs to UDO-UDTs can at this point in time only happen via SAP Business One UI:
Note that DBDataSource is much more powerful now!!!!! =>
You can add complete lines/rows (not in SAP B1 system forms ...) and afterwards add the data to the database - without using DI API...
I.e. you could create open form, retrieve data from existing UDTs via one DBDataSource and add the data to the DBDataSource for the new UDO UDT + then click the "Add" button on your form (must be in Add mode then, of course). That should do the trick!!!!
I didn't try exactly this - just worked with UDO, but this is the way it should work; maybe there are preconditions to have the particular DBDataSource fields bound to UI items, but I would expect this not to be necessary...
Regards,
Frank
User | Count |
---|---|
96 | |
9 | |
8 | |
5 | |
4 | |
3 | |
3 | |
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.