Pages

Friday 13 April 2012

Customize sharepoint notification bar


Sharepoint 2010 site provides an area called notification bar. This bar appears when you open Edit control box. Using sharepoint client side API, you can use it. Just paste the below code in content editor web part.


<script type="text/javascript">
var notifyid;
function CreateNotification() {
notifyid = SP.UI.Notify.addNotification(" My HTML Notification ", true, "My Tooltip", "HelloWorld");
alert("Notification id: " + notifyid);
}
function RemoveNotification() {
SP.UI.Notify.removeNotification(notifyid);
}
</script><input onclick="CreateNotification()" type="button" value="Create Notification"/> <br/><input onclick="RemoveNotification()" type="button" value="Remove Notification"/>

Change display name of sharepoint user


You can use below powershell command to change sharepoint user display name.


Set-SPuser -identity "User name" -DisplayName "Display Name" -web Web url


Note: for AD user username would be like domain name\username. For FBA user it would be like i:0#.f|providername|username (You can get the exact username from My Settings page.

In case you get access denied while changing the display name, run powershell as administrator/Farm admin. You can get this option by pressing shift key then right click on Sharepoint powershell management console icon.


The password supplied with the username was not correct sharepoint


Recently I encountered an error while creating web application from central admin site

"The password supplied with the username was not correct. Verify that it was entered correctly and try again".

The reason is that administrative password may have been modified but SharePoint farm is still using the old administrative credential.

To fix this issue execute below stsadm command:


stsadm -o updatefarmcredentials -userlogin <domain\username> -password <newpassword>

Popular Posts