Showing results for 
Search instead for 
Did you mean: 

get object type using UI API

Former Member
0 Kudos

hi expert,

i have a problem in getting a object type of a specific document or business partner.

how can i get the object type using the following information via UI API

1. form uid

2. document entry

3. form type

and also the database table using UI API by


Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I'm not sure I understand your question when you say type?

Do you mean if the BP is customer or vendor? And what type of marketing document is open?

There is no simple way, it will require some coding.

For BPs, you can do oForm.Datasources.DbDatasources.Item("OCRD").GetValue("CardType", 0) - if its C it's customer, S is vendor, L is Lead

For documents, its a bit trickier but there are multiple ways to do it:

FormTypeEx - e.g. 139 is Sales Order, 140 is delivery. But you need to go through every form and code for it.

The second way also covers your question about the database table. You can do:

string tablename = oForm.Datasources.DbDatasources.Item(0).TableName;

Then you can tell ORDR is Sales Order, ODLN is Delivery Note, OINV is Invoice etc etc.

Former Member
0 Kudos

thanks njmog1,

Answers (0)