cancel
Showing results for 
Search instead for 
Did you mean: 

Business objects (UDO)

Former Member
0 Kudos

Is there a way to get my business object (a UDO) back in the same manner as a B1 GetBusinessObject()? This way I could update the fields as needed.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

I haven't used this feature myself. But in version 8.8 you have a DI API object called GeneralService that will allow you add and update UDOs.

But this feature is only available in SAP 8.8

Eneveux
Product and Topic Expert
Product and Topic Expert
0 Kudos

Actually this feature first became available in SAP Business One 2007A PL46. You can see the blog on this on SDN at ...

/people/daniel.wroblewski/blog/2009/03/26/udo-access-via-di-api-in-pl46

So it is available for Business One 8.8 and 2007A as of PL46.

Eddy

pedro_magueija
Active Contributor
0 Kudos

Hi,

You can use General Services to Add/Update/Select from your UDO's.

There are examples in the SDK Help.

You can read further [here|].

Best regards.

Former Member
0 Kudos

I'm on 2007 version...

If i'm not wrong i think you can use this code to access data from your tables..

Dim oUserTable as SAPbobsCOM.UserTable
oUserTable = oCompany.UserTables.Item("Res")   '-- Res is your User Defined Table name
oUserTable.Code = "123"               ' -- Default fields SAP provides can be accessed directly
oUserTable.Name = "Test"
oUserTable.UserFields.Fields.Item("U_LS").Value = "Test Data"    '-- To access User Defined Fields.
oUserTable.UserFields.Fields.Item("U_Rb").Value = "Data2"

oUserTable.Add()

I think this code's suppose to work. But you can use it only after maiking the UDO.

Correct me if i'm wrong. I'm still new to B1

Thanks.

Gianluigi
Product and Topic Expert
Product and Topic Expert
0 Kudos

You can read the tables of your UDOs with SQL, this is

allowed by SDK development guidelines.

You cannot add / update / delete UDOs out of B1, sorry.

Former Member
0 Kudos

Nothing new about these?!

Former Member
0 Kudos

i'm facing same proble

how can access UDO as object in code ?

Former Member
0 Kudos

I am facing the same problem. Actually, we have created the code for access the UDO (select, updates, delete, etc).

This is very really odd. Does it make sense not to allow access UDOS as objects? It would be great allowing the GetBusinessObject() for the udos too.

Do you know if this will be fixed? or do you know the reason for this restriction?

Thank you very much in advance!

Regards,

Former Member
0 Kudos

hi all,

any update on this matter?

regards

Fabio

Former Member
0 Kudos

Hello Gary,

Sorry to tell you that updating UDO is not supported by DI API now.

Sorry,

Nick

Former Member
0 Kudos

Is it even possible to read it without a form? ..or do I have to resort to the hack of creating a form and making it invisible?

Hardly much of an "Data Object" then...