on 03-21-2011 9:49 AM
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 vb.net
thanks
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
106 | |
12 | |
11 | |
6 | |
5 | |
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.