BrunovskyR | Mail Owner - GetProfileDocument (" CalendarProfile ") |
| Chcem si do vytvaranej databazy natiahnut udaje o mail databazach - porovnat si v pohlade polia Owner v jednotlivych mail databazach.
V skripte pouzivam Set doc = db.GetProfileDocument("CalendarProfile") vo forme (Calendar Profile) sa toto pole nachadza, ale vracia sa mi prazdny string doc.owner(0) = ""
Spustam tento script z databazy s ID admina, ktory ma v kazdom ACL prava managera. Preco nevracia pole Owner, ktore je normalne vidiet pri otvoreni formu cez Nastroje/Predvolby. |
VZ | Existuje ten profil? |
12.12.2006 16:56:56
ID: 2012.1
| Co když ten profil ještě v některých DB neexistuje? Pak by funkce GetProfileDocument("CalendarProfile") vytvořila nový profil. Mohl by být NotesItem "owner" v takovém případě prázdný, nebo by to házelo chybu, že daný item neexistuje?
Je možné, že by z nějakého důvodu nebyl v některých DB v profilu vyplněný (a uložený) owner, případně mohlo by existovat více stejných profilů s různými hodnotami?
Jaký počet profilů by asi vrátil následující skript, pokud by byl použit před řádkem "Set doc = db.GetProfileDocument("CalendarProfile")":
Dim coll As NotesDocumentCollection Set coll = db.GetProfileDocCollection("CalendarProfile") msgbox Cstr(coll.count) |
BrunovskyR | db.GetProfileDocCollection("CalendarProfile") |
IT
12.12.2006 17:57:57
ID: 2012.2
| Toto mi zbehlo na jednej test db, uvidim zajtra na ostrom servri, zatial vdaka ...
On Error Goto Chyba Dim coll As NotesDocumentCollection Dim maildb As NotesDatabase Dim doc As NotesDocument Set maildb = New NotesDatabase("SERVER/TEST" ,"mail\testmail.nsf") Msgbox "Veľkosť " & maildb.Size Set coll = maildb.GetProfileDocCollection("CalendarProfile") If coll.Count = 0 Then Messagebox "Nenašiel som CalendarProfile",64,"Správa" Exit Sub End If Set doc = coll.GetFirstDocument Do While Not (doc Is Nothing) If doc.HasItem("Owner") Then Msgbox "CalendarProfile aj pole Owner existuje:" Msgbox doc.Owner(0) End If Set doc = coll.GetNextDocument (doc) Loop Set doc = Nothing Set coll = Nothing Set maildb = Nothing Exit Sub Chyba: Msgbox "CHYBA: " & Str(Err) & ": " & Error$ & " Riadok: " & Str(Erl) Resume Next |