1
votes

I tried to set OOO mail with the following code

 Document doc1=database.getProfileDocument("outofofficeprofile", null);
doc1.replaceItemValue("FirstDayOut",validStartDate);
doc1.replaceItemValue("FirstDayBack",validEndDate);
oc1.replaceItemValue("SpecialSubject", "Sorry for inconvinience i ll be out of office");
doc1.replaceItemValue("'CurrentStatus'", "1");
doc1.replaceItemValue("TaskState", "1");
doc1.save();

but its not updated in the mail file (more>Out Of Office). can any one help me how to set it programmatically. I came to know that using Java Out Of Office agent it can be done, if so Please give me the details like how to invoke the agent pro grammatically.

2
Where are you running this Java code? Profile documents are cached in memory. If you run this code as an agent on the server, and then go to a client machine that was already running before the agent ran, then what you are going to see is the values that were cached before the agent ran. You will not see the changes that the agent made because the cache on the client has not been updated. That makes it difficult to verify the changes, even though they have in fact been made.Richard Schwartz
Thnks Richard,can u plz tell how to implement OutOfOffice service.i am writing a webservice for setting the OutOfOffice message using domino designer 8.5.3.Phoenix
No, I cannot tell you. I've never done it myself. I am just trying to help you. I think you can do it from a web service, but I don't know if you are doing everything that is neccessary. I am just telling you that when you said "but its not updated in the mail file", you may be seeing cached data. It may be updated correctly, but you can't see it unless you completely restart the Notes client.Richard Schwartz

2 Answers

0
votes

Please check the security settings of the server document,

Run restricted LotusScript/Java agents

If the setting is correct?

0
votes

You may need to check which ID the code that you are running is signed with. OOO can only be enabled by users ID. I would suggest that you should try using "Run on-behalf of" option to run your code with user ID for whom the OOO is being enabled.