[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1192
  • Last Modified:

Adding calendar entry via LotusScript

I have been using this code which was working until now.   In fact it still works as long as the recipient of the calendar entry is not using an 8.5.1 template, if the recipient is on an 8.0.2 template - it works fine.

Has there been changes to the docment.Save function?
Print "Adding to " & resp(x) & "'s calendar . . ."        
action = "add"
Set docTemp = docCur.CopyToDatabase(dbTemp)
docTemp.ParentUNID = docCur.ParentUNID
docTemp.ParentDB = dbCur.FilePath
Call docTemp.Save(True, False)
docTemp.ApptUNID = docTemp.UniversalID
Call docTemp.Save(True, False)
Print "Added to " & Resp(x) & "'s calendar Successfully"

Open in new window

  • 3
2 Solutions
Sjef BosmanGroupware ConsultantCommented:
I suppose the document is saved correctly, but that 851 needs more or different fields in the document. You could try to create an appointment manually, both in R8.0 and in R8.5.1, and then compare the fields that are created, using the Document Properties.
Try to call
   Call docTemp.ComputeWithForm( False, False )

before saving it.

If that doesn't work you can (besides logical thing Sjef suggested) see here and compare the code:
Sjef BosmanGroupware ConsultantCommented:
Hm, yes, indeed, ComputeWithForm could do the trick... but I think it is of little use, for it is executed in the local mail database and not in the receiver's one, so the local form is used.
mblumelAuthor Commented:
Thank both of you very much for lending a hand.   This morning, with a clear head, I stepped through the code and realized I did not re-create a view in the 8.5.1 template that I was using in 8.0.2 to check against prior to adding the entry.

There are no differences between the old/new template as far as programatically creating a calendar entry, the above code works perfectly.
Sjef BosmanGroupware ConsultantCommented:
Now really... But thanks! :-)

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now