dbaspot
Tags Register FAQ Calendar Search Today's Posts Mark Forums Read

How to add a contact in names.nsf - lotus-notes-misc

This is a discussion on How to add a contact in names.nsf - lotus-notes-misc ; Here is my python code,I dont know why all operation return success,but In Notes I dont see any new contact.But the change operation is OK.Such change a property of contact. " from win32com.client import Dispatch import pywintypes try: session = ...


Home > Database Forum > Other Technologies > lotus-notes-misc > How to add a contact in names.nsf

Reply

 

LinkBack Thread Tools Display Modes
  #1  
Old 10-15-2008, 02:10 AM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default How to add a contact in names.nsf

Here is my python code,I dont know why all operation return
success,but In Notes I dont see any new contact.But the change
operation is OK.Such change a property of contact.


"
from win32com.client import Dispatch
import pywintypes
try:
session = Dispatch('Lotus.NotesSession')
session.Initialize("zclino2")

db = session.getDatabase("", "names.nsf")
doc = db.CreateDocument()
result = doc.Save(True,False)
print "result:",result
"
Reply With Quote
  #2  
Old 10-15-2008, 03:40 AM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default Re: How to add a contact in names.nsf

On Oct 15, 8:10*am, Chunlin Zhang wrote:
> Here is my python code,I dont know why all operation return
> success,but In Notes I dont see any new contact.But the change
> operation is OK.Such change a property of contact.
>
> "
> from win32com.client import Dispatch
> import pywintypes
> try:
> * * session = Dispatch('Lotus.NotesSession')
> * * session.Initialize("zclino2")
>
> * * db = session.getDatabase("", "names.nsf")
> * * doc = db.CreateDocument()
> * * result = doc.Save(True,False)
> * * print "result:",result
> "


Hi,
if this is the whole code it is pretty clear, because the views are
filtered on various fields and as you don't specify any of them the
document isn't visible.

martin
Reply With Quote
  #3  
Old 10-16-2008, 05:04 AM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default Re: How to add a contact in names.nsf


>
> Hi,
> if this is the whole code it is pretty clear, because the views are
> filtered on various fields and as you don't specify any of them the
> document isn't visible.
>
> martin

Thanks for your advice.
I have solved it now.
the document 's property "Form" & "Type" should be set as "person"
Reply With Quote
Reply

Thread Tools
Display Modes



All times are GMT -4. The time now is 06:33 PM.