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?
Enable Email Notifications through API
Moderator: SourceGear
Re: Enable Email Notifications through API
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.
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.
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager