Page 1 of 1

Enable Email Notifications through API

Posted: Mon Aug 19, 2013 7:25 am
by wenff007
I would like to use the Vault API to switch the "Enable Email Notifications" checkbox (under Tools > Options > Notifications in the Vault Client) on and off.
I can't seem to find it in ServerOperations.client.ClientInstance.UserOptions.Options, ServerOperations.client.ClientInstance.UserOptions.LocalOptions or in the Registry under HKey_Current_User.

Where do I access and/or set the settings related to the current user's email notification preferences through the API?

Re: Enable Email Notifications through API

Posted: Mon Aug 19, 2013 10:35 am
by lbauer
There is no straight forward way to do this through the API. You would need to:
a) Retrieve existing notification settings -
ClientInstance.Connection.GetNotificationCriteriaOptions()

b) Using the NotificationCriteriaOptions from step a, instantiate a UpdateNotificationCriteriaOptions object, and set ALL data in this object to the values of NotificationCriteriaOptions, and then add the exception to EmailNotificationEnabled, which would be set to true.

Another option would be to use a SQL Query to set notifications on or off in the Notify database.

Email me at support at sourcegear.com, ATTN: Linda if you'd like a copy of the queries.
Please include a link to this forum post.