Hi,
Is there any way we can update the signature for a particular user using the script AP?
Any information will help.
Regards,
Anshuman
Hi,
Is there any way we can update the signature for a particular user using the script AP?
Any information will help.
Regards,
Anshuman
The settings widget is using this jQuery code to update signature , if you need a script api you can setup an automation with jQuery by setting up the manual execution
_saveUser = function(context) {
var data = {
Language: $(context.languageSelector).val(),
PrivateEmail: $(context.privateEmailSelector).val(),
EnableFavoriteSharing: $(context.sharedFavoritesSelector).is(':checked'),
AllowSiteToContact: $(context.allowSiteContactSelector).is(':checked'),
AllowSitePartnersToContact: $(context.allowSitePartnersContactSelector).is(':checked'),
EnableDisplayInMemberList: $(context.enableDisplayInMembersSelector).is(':checked'),
TimeZoneId: $(context.timezoneSelector).val(),
DateFormat: $(context.dateFormatSelector).val(),
UserId : context.userId
};
if ($(context.editorListSelector).length > 0)
data.EditorType = $(context.editorListSelector).val();
if ($(context.receiveEmailsSelector).length > 0)
data.ReceiveEmails = $(context.receiveEmailsSelector).is(':checked');
if ($(context.enableHtmlEmailSelector).length > 0)
data.EnableHtmlEmail = $(context.enableHtmlEmailSelector).is(':checked');
if (context.getSignature)
{
data.Signature = context.getSignature();
}
if ($(context.enableUserSignaturesSelector).length > 0)
{
data.EnableUserSignatures = $(context.enableUserSignaturesSelector).is(':checked');
}
if ($(context.conversationContactType).length > 0)
{
data.ConversationContactType = $('input:checked', $(context.conversationContactType)).val();
}
if ($(context.enablePresenceTracking).length > 0) {
data.EnablePresenceTracking = $(context.enablePresenceTracking).is(':checked');
}
return $.telligent.evolution.put({
url: $.telligent.evolution.site.getBaseUrl() + 'api.ashx/v2/users/{UserId}.json?IncludeFields=User.Id',
data: data,
dataType: 'json',
defaultErrorMessage: context.saveErrorText
});The settings widget is using this jQuery code to update signature , if you need a script api you can setup an automation with jQuery by setting up the manual execution
_saveUser = function(context) {
var data = {
Language: $(context.languageSelector).val(),
PrivateEmail: $(context.privateEmailSelector).val(),
EnableFavoriteSharing: $(context.sharedFavoritesSelector).is(':checked'),
AllowSiteToContact: $(context.allowSiteContactSelector).is(':checked'),
AllowSitePartnersToContact: $(context.allowSitePartnersContactSelector).is(':checked'),
EnableDisplayInMemberList: $(context.enableDisplayInMembersSelector).is(':checked'),
TimeZoneId: $(context.timezoneSelector).val(),
DateFormat: $(context.dateFormatSelector).val(),
UserId : context.userId
};
if ($(context.editorListSelector).length > 0)
data.EditorType = $(context.editorListSelector).val();
if ($(context.receiveEmailsSelector).length > 0)
data.ReceiveEmails = $(context.receiveEmailsSelector).is(':checked');
if ($(context.enableHtmlEmailSelector).length > 0)
data.EnableHtmlEmail = $(context.enableHtmlEmailSelector).is(':checked');
if (context.getSignature)
{
data.Signature = context.getSignature();
}
if ($(context.enableUserSignaturesSelector).length > 0)
{
data.EnableUserSignatures = $(context.enableUserSignaturesSelector).is(':checked');
}
if ($(context.conversationContactType).length > 0)
{
data.ConversationContactType = $('input:checked', $(context.conversationContactType)).val();
}
if ($(context.enablePresenceTracking).length > 0) {
data.EnablePresenceTracking = $(context.enablePresenceTracking).is(':checked');
}
return $.telligent.evolution.put({
url: $.telligent.evolution.site.getBaseUrl() + 'api.ashx/v2/users/{UserId}.json?IncludeFields=User.Id',
data: data,
dataType: 'json',
defaultErrorMessage: context.saveErrorText
});