IDatabaseGetListItemByName Method |
Returns IListTextItems containing all the items in the given table, filtered and grouped according to the current user's group, but without the headings.
Note that items that are repeated under more than one heading will be repeated in the list.
Namespace: SuperOffice.COM.SuperOfficeDB
Get information from the DocTmpl table
This text may be copied to the notepad, and saved as a *.vbs file. Remember to change the login information.
dim objso dim objlistitems set objso = CreateObject("superofficedb.database") If not (objSO is nothing) then objso.login "<username>", "<password>" set objlistitems = objso.getlist(130) for each item in objlistitems msgbox item.text next else msgbox "unable to connect to database" end if set objso = nothing
Get the text string that represents the category of current contact
This text may be copied to the notepad, and saved as a *.vbs file. You need a running CRM win client to make it work. (This example uses the SuperOffice COM application library and not the SuperOffice db library interface).
dim objso dim objcl set objso = CreateObject("superoffice.application") If not (objSO is nothing) Then set contact = objso.currentcontact cat_id = contact.category.id set objcl = objso.database.getlistitem (64,cat_id) msgbox "contact 2 has category " & objcl.text else msgbox "could not log in" end if set objso = nothing
Get the list item
dim objSO set objSO = createobject("SuperOfficeDB.Database") If not (objSO is nothing) Then objSO.login "<username>", "<password>" Set myListTextItem = objSO.GetListItemByName(enTableDocTmpl, "Memo") msg = "Template 'Memo' have the following doctmpl_id=" & myListTextItem.Id & " with tooltip: " & myListTextItem.Tooltip & vbCrLf Set myListTextItem = objSO.GetListItemByName(enTableCategory, "Customer") msg = msg & "Category 'customer' have the category_id=" & myListTextItem.Id & vbCrLf Set myListTextItem = objSO.GetListItemByName(enTablePersPos, "Sales") msg = msg & "Person position 'sales' have perspos_id=" & myListTextItem.Id & vbCrLf MsgBox msg else msgbox "Unable to log in" end if set objSO = Nothing