How to force refresh of calendar to reflect changes to colored categories

I have updated color for one of the categories in the calendar profile document, but the colors don’t actually get pushed down to the client. If the user clicks More > Preferences > OpenNTF > Category Colors … they see the new category and the new color, but unless they make a change to something and press OK their calendar never refreshes with that new color for that category.

Here’s how I updated the colors:

Dim s As New NotesSession

Dim db As notesdatabase

Dim profile As notesdocument

Set db=s.CurrentDatabase

Set profile=db.GetProfileDocument("CalendarProfile")

Call profile.replaceitemvalue("Category3List", "HR Announcement")

Call profile.replaceitemvalue("Category3B", "FFC0B6")

Call profile.replaceitemvalue("Category3F", "E12000")

Call profile.save(True, True) 

I see a call in the origonal code that I think might refresh the colors, but I’m not sure how to run it (just adding this with the code above doesn’t actually refresh anything).

Call colorNote.replaceitemvalue(“colorChange”, “1”)

We’re using this for “HR Announcements”, so that the color of those items tagged show up as All Day Events with a RED color instead of the default color.

Anybody got any clues? I’d really appreciate a push in the right direction here.

Subject: Calendar Profile - save changes

At least a new discover for ME, is that the Preferences IS the Calendar Profile document. If you look at the “Restore Default Colors” button at the bottom of the Colors tab, these two lines end the formula:

@SetField(“colorchange”;“2”);

@SetField(“rebuildCalendar”;“1”);

I would assume that “rebuildCalendar” = 1 tells the system to apply the changes. I’m in the process of making custom categories for a client and am building new fields similar to this tab. I haven’t tested it yet so what I’m saying might be completely wrong but try it.

Subject: Save changes (con’t)

I just saved the post and saw in the onchange event for each of the fields that are changeable, has this code…

Sub Onchange(Source As Field)

Call colorNote.replaceitemvalue("colorChange", "2")

Call ColorNote.replaceitemvalue("rebuildCalendar", "1")

End Sub

Same settings as the formula in the button. Just an FYI… Hope it helps (me and you)…