Category not appear in To Do document

Hi In my application there are some task assigned for each user. For which i hav to create Task in user’s calendar and todo list.

Now there are to situations

  1. when i have access to user’s mailDatabase – In this case i have successfully created ToDo in his calendar with all required fields(Alarm,categories,…etc).

  2. When i do not hav access to his mail box … The solution i have is to send ToDo via mail. Which also i have done successfully but there is one problem that Category field not get value while i alredy set categories item from backend in that doc before sending.

Now i got stuck at this point If any one has done similar to this please suggest the solution.

CODE :

(loAlertDoc is a document which have all the items that are essantial for ToDo)

'// variables for laocal

Dim loMailToDo As NotesDocument

Dim loAlertDoc As NotesDocument

     Dim loTmpStartDate As NotesDateTime '// to hold start date 

Dim loTmpDueDate As NotesDateTime	'// to hold due date 



Set loMailToDo = goCurrentDatabase.CreateDocument

Set loAlertDoc = aioAlertDocument



'// create notesdatetime object for start date and due date 

Set loTmpStartDate = New NotesDateTime(loAlertDoc.GetItemValue("COMALERT_StartDate")(0)) 

Set loTmpDueDate = New NotesDateTime(loAlertDoc.GetItemValue("COMALERT_DueDate")(0)) 







'// Set Subject for To Do 

Call loMailToDo.replaceitemvalue ("Subject" , loAlertDoc.GetItemValue("COMALERT_Subject")(0))



'// Set StartDate  for To Do 

Call loMailToDo.replaceitemvalue ("StartDate" , loTmpStartDate)



'// Set StartDateTime  for To Do 

Call loMailToDo.replaceitemvalue ("StartDateTime" , loTmpStartDate)



'// to show entry in calendar

Call loMailToDo.replaceitemvalue ("CalendarDateTime" , loTmpStartDate)



'// Set DueDate  for To Do 

Call loMailToDo.replaceitemvalue ("DueDate" , loTmpDueDate)



'// Set DueDateTime  for To Do 

Call loMailToDo.replaceitemvalue ("DueDateTime" , loTmpDueDate)



'// Set categories

Call loMailToDo.replaceitemvalue ("Categories" , "Official")  '// This not appear



'// Set Chair

Call loMailToDo.replaceitemvalue ("Chair" , loAlertDoc.GetItemValue("COMALERT_UserName")(0))



'// Set View Icon

Call loMailToDo.replaceitemvalue ("_ViewIcon" , loAlertDoc.GetItemValue("COMALERT_ViewIcon")(0))



'// For Alarm

Call loMailToDo.ReplaceItemValue ("$Alarm", 1)

Call loMailToDo.ReplaceItemValue ("$AlarmDescription", loAlertDoc.GetItemValue("COMALERT_Subject")(0))

Call loMailToDo.ReplaceItemValue ("$AlarmMemoOptions", "")

Call loMailToDo.ReplaceItemValue ("$AlarmOffset", 0)

Call loMailToDo.ReplaceItemValue ("$AlarmUnit", "M")







'// due state 

Call fpsSetDueStateForAlertDocument (loMailToDo)



Call fpsSetDefaultValues(loMailToDo) 		





'// Set Reciepients info.



loMailToDo.SendTo = loAlertDoc.GetItemValue("COMALERT_UserName")(0)



REM Msgbox loAlertDoc.GetItemValue("COMALERT_UserName")(0)

REM Msgbox loMailToDo.getitemvalue ("Categories")(0) 

Call loMailToDo.Send(False)

'// Instead of creating category item it creates FromCategory item in ToDo Doc when it appears in User’s mail box.

Thanks & Regards

Rohit

Subject: category not appear in To Do document

You are right, the category field does not persist.

Set your category value in a custom field and modify the template to use it if it exists.

Subject: RE: category not appear in To Do document

Hi i did not understand thiis logic. Could you please explain me the same…

Regards

Rohit

Subject: RE: category not appear in To Do document

Whoops, sorry.

// Set categories

Call loMailToDo.replaceitemvalue (“CategoriesXXX” , “Official”) '//

FIELD Categories default value → use CategoriesXXX if it has a value.