Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

PreviousPrevious NextNext


db sh 19.Nov.12 10:04 AM a Web browser
Applications Development All Releases All Platforms


Dear All,

I have one old application in this user block the calender. Means there is one button called block calender when he click on that button then calender opens and set saome field value. Here is the code

Sub Click(Source As Button)

Dim uidoc1 As NotesUIDocument
Dim ui As New NotesUIWorkspace
Dim dbMail As New NotesDatabase("", "")
Dim uiCalendarEntry As NotesUIDocument ' Calendar Entry in users MailDb
Dim s As New NotesSession
Dim StartDate1 , EndDate1
Dim item As NotesItem

Set uidoc1 = ui.CurrentDocument
Set doc=uidoc1.Document

StartDate1=uidoc1.FieldGetText("VacationStartDate")
Enddate1=uidoc1.FieldGetText("VacationEndDate")

Date1=Cdat(StartDate1)
Date2=Cdat(EndDate1)

'dont block calendar for half days-------------------------------------------------------------------------------------------------------------------------------------
If uidoc1.FieldGetText("StartDate") ="Yes" And uidoc1.FieldGetText("EndDate") ="" Then
StartDate1= Date1 + 1
EndDate1=Date2
End If

If uidoc1.FieldGetText("StartDate") ="" And uidoc1.FieldGetText("EndDate") ="Yes" Then
StartDate1=Date1
EndDate1= Date2 - 1
End If

If uidoc1.FieldGetText("StartDate") ="Yes" And uidoc1.FieldGetText("EndDate") ="Yes" And StartDate1 <> EndDate1 Then
StartDate1= Date1 + 1
EndDate1= Date2 - 1
End If
'----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

uidoc1.EditMode=True

'...set value of hidden fields, so that it can be accessed by calendar entry-----------------------------------------------------------------------------------
Set item = doc.ReplaceItemValue ("Block_Start_Date",StartDate1)
Set item = doc.ReplaceItemValue ("Block_End_Date",EndDate1)
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

'create a appointment in calender of the user------------------------------------------------------------------------------------------------------------------------


If (uidoc1.FieldGetText("StartDate") ="Yes" Or uidoc1.FieldGetText("EndDate") ="Yes" ) And StartDate1 = EndDate1 then
Messagebox("book maual.")
Else

Set uiDoc = ui.CurrentDocument

If uiDoc.EditMode Then
uiDoc.Refresh
End If

dbMail.OpenMail 'open users mail for calendar entry

' use the appointment form (all calendar entries do)
Set uiCalendarEntry = ui.ComposeDocument(dbMail.Server, dbMail.FilePath, "Appointment")
uiCalendarEntry.FieldSetText "AppointmentType", "2" 'Appointment
uiCalendarEntry.FieldSetText "Subject", "Leave"
uiCalendarEntry.FieldSetText "StartDate",uidoc.FieldGetText("Block_Start_Date")
uiCalendarEntry.FieldSetText"EndDate", uidoc.FieldGetText("Block_End_Date")
uiCalendarEntry.FieldSetText "Body", "On leave"
uiCalendarEntry.FieldSetText "StartTime","08:00:00 AM"
uiCalendarEntry.FieldSetText "EndTime","08:00:00 PM"
uiCalendarEntry.FieldSetText "Alarms","0" {Here
get error IBM notes Error-Can not locate field)
uiCalendarEntry.Save
uiCalendarEntry.Close


Messagebox(" Please manually block your calende for half days taken .")


End If
'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

'change the Calendar_block_Flag to 1 so that the block calendar button is hidden once the calender is blocked---------------------------------
uidoc1.EditMode=True
Call uidoc1.FieldSetText("Calendar_Block_Flag","1")
uidoc1.Refresh
uidoc1.Save
'-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
End Sub


So the problem is getting error IBM Lotus notes error "Can not locate field" in line uiCalendarEntry.FieldSetText "Alarms","0".

What can i do.. in previous it was working fine.. now i am using 8.5.2

Please suggest.

Thanks in advance.






For Alarm field "Can not locate" (db sh 19.Nov.12)
. . RE: For Alarm field "Can not locate... (Martha Geppert 19.Nov.12)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite