cancel
Showing results for 
Search instead for 
Did you mean: 

Get newly added DocEntry of UDO

Former Member
0 Kudos

Hi,

How do we get the newly added DocEntry of a UDO when ActionSuccess = True?

I am using 2004B and VB. Your input is urgently needed. Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184566
Active Contributor
0 Kudos

Hi CK Chue

I know that this works for journals,docs and so on. Not sure for UDO, but it is worth a try.

Dim Str as String

oCompany.GetNewObjectCode(Str)

Hope this helps

Former Member
0 Kudos

Hi Louis

I agreed that this works for SBO business object and have done similar one before. However, my concern is to get the key for newly added UDO.

Thank you very much for the input.

Answers (2)

Answers (2)

andy313
Explorer
0 Kudos

Use this:

Dim NewDocEntry as Integer
oCompany.GetNewObjectKey(NewDocEntry) 

or 

Dim NewDocNum as Integer
oCompany.GetNewObjectCode(NewDocNum) 
Former Member
0 Kudos

Maybe you could create a query to find the highest number in the UDO.

For example

select max(docnum) from UDOTable