tag:blogger.com,1999:blog-18683237416071690392024-02-18T17:49:31.296-08:00SharePoint Helpbhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.comBlogger29125tag:blogger.com,1999:blog-1868323741607169039.post-58287729146903509182015-07-25T10:27:00.003-07:002015-07-25T10:27:54.814-07:00The password supplied with the username Domain\UserName was not correct. Verify that it was entered correctly and try again<div dir="ltr" style="text-align: left;" trbidi="on">
When you create New web application in SP2013 & you got the following error:-<br />
<br />
Sorry, something went wrong:- The password supplied with the username Domain\UserName was not correct. Verify that it was entered coorectly & try again.<br />
<br />
You can login in central admin with same username & password but you will prompt for new web application or existing web application.<br />
<br />
For that, existing application check IIS & set username & password again in Application Pool of web application--> Advance settings.<br />
<br />
If still the problem persist try the following command in powershell:-<br />
<br />
stsadm -o updatefarmcredentials -userlogin Domain\UserName -password YourPassword<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4PNMnuf8phFElQnt1D-p7JGKOKu5yy_2g8tQxIndB56k_aB7qDZOjdt13dzHMe7qFwk7qkopSTlmOxL2Q4izQsSaT5IFDo8uyssCC3tITPyi7AhJXpQeug2BnjvmDB0wmsVyCJsCjOlaZ/s1600/Powershell+Command.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="116" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4PNMnuf8phFElQnt1D-p7JGKOKu5yy_2g8tQxIndB56k_aB7qDZOjdt13dzHMe7qFwk7qkopSTlmOxL2Q4izQsSaT5IFDo8uyssCC3tITPyi7AhJXpQeug2BnjvmDB0wmsVyCJsCjOlaZ/s320/Powershell+Command.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
The above problem occur when farm account password is expire and it's password is changed or simply farm account password is changed.<br />
<br />
<br />
Hope, this will help.. :-)</div>
bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com0tag:blogger.com,1999:blog-1868323741607169039.post-19594221707827338972013-08-24T03:58:00.001-07:002013-08-24T04:02:47.320-07:00Hide Upload,Multiple, Add Document link from library view for DocSet<div dir="ltr" style="text-align: left;" trbidi="on">
The requirement is that to avoid user to create, edit and delete docset, but they can add, upload, edit document inside the Doset. Also, avoid user to add document outside the Docset. <style type="text/css">
TD.ms-addnew {
DISPLAY: none !important
}
#Ribbon\.Documents\.New\.AddDocument-Large
{
display:none;
}
</style><br />
<br />
So for the above requirement, i had created css file and uplaod it to style library and add the path of file path on library view page, where docset available. The css available in my file is as below:-<br />
<br />
TD.ms-addnew<br />
{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>DISPLAY: none !important<br />
}<br />
#Ribbon\.Documents\.New\.AddDocument-Large<br />
{<br />
display:none;<br />
}<br />
#Ribbon\.ListItem\.New\.NewListItem-Large<br />
{<br />
display:none;<br />
}<br />
#Ribbon\.Documents\.New\.NewDocument-Large<br />
{<br />
display:none;<br />
}<br />
#Ribbon\.Documents\.Manage\.EditProperties-Large<br />
{<br />
display:none;<br />
}<br />
#Ribbon\.Documents\.Manage\.Delete<br />
{<br />
display:none;<br />
}<br />
#Ribbon\.Documents\.Manage<br />
{<br />
display:none;<br />
}<br />
<br />
<br />
and add the below javascript inside the doset page to hide the "View All Properties" and "Edit All Properties".<br />
<br />
<script language="javascript"><br />
<div class="MsoPlainText">
<span style="font-family: "Courier New";">_spBodyOnLoadFunctionNames.push("HideShow");<o:p></o:p></span></div>
<div class="MsoPlainText">
<span style="font-family: "Courier New";"> function HideShow()<o:p></o:p></span></div>
<div class="MsoPlainText">
<span style="font-family: "Courier New";">{<o:p></o:p></span></div>
<div class="MsoPlainText">
<br /></div>
<div class="MsoPlainText">
<span style="font-family: "Courier New";"> var EditProperties = document.getElementById
('EditPropsLink');<o:p></o:p></span></div>
<div class="MsoPlainText">
<span style="font-family: "Courier New";">if(EditProperties
!= null)<o:p></o:p></span></div>
<div class="MsoPlainText">
<span style="font-family: "Courier New";">{<o:p></o:p></span></div>
<div class="MsoPlainText">
<span style="font-family: "Courier New";"> EditProperties.style.display =
"none";<o:p></o:p></span></div>
<div class="MsoPlainText">
<span style="font-family: "Courier New";">}<o:p></o:p></span></div>
<div class="MsoPlainText">
<span style="font-family: "Courier New";">var
ViewProperties = document.getElementById('ViewPropsLink');<o:p></o:p></span></div>
<div class="MsoPlainText">
<span style="font-family: "Courier New";">if(ViewProperties
!= null)<o:p></o:p></span></div>
<div class="MsoPlainText">
<span style="font-family: "Courier New";">{<o:p></o:p></span></div>
<div class="MsoPlainText">
<span style="font-family: "Courier New";"> ViewProperties.style.display =
"none";<o:p></o:p></span></div>
<div class="MsoPlainText">
<span style="font-family: "Courier New";">}<o:p></o:p></span></div>
<div class="MsoPlainText">
<br /></div>
<br />
<div class="MsoPlainText">
<span style="font-family: "Courier New";">}<o:p></o:p></span></div>
<script/><br />
Happy coding..... :-)<br />
<br /></div>
bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com0tag:blogger.com,1999:blog-1868323741607169039.post-77671933946692890072013-08-24T03:22:00.000-07:002013-08-24T03:45:48.056-07:00Expand only the first group and have the rest of the groups collapsed in Dataform webpart SP 2010<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal">
Now, it is possible in DVWP to expand only the first group
and have the rest of the groups collapsed.</div>
<div class="MsoNormal">
Example:-</div>
<div class="MsoNormal">
<b>- Group: Year 2013<o:p></o:p></b></div>
<div class="MsoNormal">
- Item 1</div>
<div class="MsoNormal">
- Item 2</div>
<div class="MsoNormal">
- Item 3</div>
<div class="MsoNormal">
<b>+ Group: Year 2012<o:p></o:p></b></div>
<div class="MsoNormal">
<b>+ Group: Year 2011<o:p></o:p></b></div>
<div class="MsoNormal">
<b>+ Group: Year 2010</b><b><o:p></o:p></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Use the following steps:-</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
1) Create dataform webpart using Sharepoint designer and
bydefault group is collapsed in dataform webpart.</div>
<div class="MsoNormal">
2) Save the page and search webpart id for dataform webpart
in view source of page. E.g In my case it is
<b>MSOZoneCell_WebPartWPQ4</b>.
Search the id for div available in webpart, <b><div id="WebPartWPQ4"</b>.</div>
<div class="MsoNormal">
3) Use the following script on page and replaced the
WebPartWPQ4 with your dataform webpart
div id. </div>
<div class="MsoNormal">
<span style="background: silver; mso-highlight: silver;"><script
src="https://Server/SiteName/Style%20Library/Custom%20Javascript/jquery-1.8.3.min.js"
type="text/javascript"></script><o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background: silver; mso-highlight: silver;"><script
type="text/javascript"><o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background: silver; mso-highlight: silver;">functioncollapseGroups()
{<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background: silver; mso-highlight: silver;">var someimage
= document.getElementById('<b>WebPartWPQ4</b>'); //Webpart Id available in div tag<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background: silver; mso-highlight: silver;">var myimg
= someimage.getElementsByTagName('img')[0];
// It will check first group
image(+) available in div tag<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background: silver; mso-highlight: silver;">var mysrc
= myimg.src;<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background: silver; mso-highlight: silver;"> //alert(mysrc);<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background: silver; mso-highlight: silver;">
//$("img[src='/_layouts/images/plus.gif']:visible").parent().click();<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background: silver; mso-highlight: silver;"> $(myimg).parent().click();<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background: silver; mso-highlight: silver;">}<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background: silver; mso-highlight: silver;">_spBodyOnLoadFunctionNames.push("collapseGroups");<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background: silver; mso-highlight: silver;"></script></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The script will find 1st <b>+</b> sign image available next to group first and forcefully fired the
click event. </div>
<br />
<div class="MsoNormal">
Bingo!!!!, the script is work properly and our issue
resolved.</div>
</div>
bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com2tag:blogger.com,1999:blog-1868323741607169039.post-57471508672742746192013-07-17T02:12:00.000-07:002013-07-17T02:35:01.185-07:00Query string value in lookup field in NewForm of list/ libraries.<div dir="ltr" style="text-align: left;" trbidi="on">
If you created custom action on list and want to pass query string value in lookup field and removed the other option from lookup so user cant change the value of lookup field used the follwoing javascript.<br />
<br />
e.g. You've built a nice custom page which lists your parent items and you have links to each parent items to add child items with respect to parent item. Also when user open the child item form user not allow to select other parent id from lookup column add the following script on child item form.<br />
<br />
your links looks like:-<br />
<br />
http://ServerName/Sites/SiteName/Lists/Listname/NewForm.aspx?ItemId ={ItemId}.<br />
<br />
<span style="color: #ea9999;">// Javascript for Querystring values selected in Lookup dropdown and removed others values on Form.<br />//Description: If Lookup column value items less than 20, html tag of dropdown 'select'. If the items greater than 20 items, html tag automaticaaly converted into 'input' in sharepoint 2010. So this script work for both condition.</span><br />
<br />
<span style="color: #ea9999;">//looks for the control of the requested type with a title that matches our current field<br />function getField(typeOfField,fieldDisplayTitle) <br />{ <br /> var matchingDocs = document.getElementsByTagName(typeOfField); <br /> for (var i=0; i < matchingDocs.length; i++) <br /> { <br /> if (matchingDocs[i].title == fieldDisplayTitle) <br /> { <br /> return matchingDocs[i]; <br /> } <br /> } <br /> return false; <br />} <br /> <br />function getParameterByName(name) <br />{ <br /> name = name.replace(/[\[]/, "</span><a href="http://www.blogger.com/null"><span style="color: #ea9999;">\\\[").replace(/[\]]/</span></a><span style="color: #ea9999;">, "</span><a href="http://www.blogger.com/null"><span style="color: #ea9999;">\\\</span></a><span style="color: #ea9999;">]"); <br /> var regexS = name + "=([^&#]*)"; <br /> var regex = new RegExp(regexS); <br /> var results = regex.exec(window.location.href); <br /> if(results == null) <br /> return ""; <br /> else <br /> return decodeURIComponent(results[1].replace(/\+/g, " ")); <br />} <br /> <br />//Set query string value to lookup field when lookup items less than 20 and removed other values from dropdown.<br />function setSelectValue(lookupControl, valueToSet)<br />{<br /> for(var i = 0; i < lookupControl.length; i++) <br /> {<br /> if(lookupControl[i].value == valueToSet) <br /> {<br /> lookupControl[i].selected = true;<br /> //lookupControl.disabled=true;<br /> }<br /> }<br /> //to remove other option from the field<br /> var options = lookupControl.options;<br /> var iCount = 0;<br /> while (lookupControl.length > 1 )<br /> {<br /> if(options[iCount].selected != true)<br /> {<br /> options[iCount] = null;<br /> } <br /> else <br /> {<br /> iCount = iCount + 1<br /> }<br /> }<br /> <br />}<br /> <br />//function to be registered on SP Body On Load to attempt to select the corresponding lookup field information<br />function attemptToSetField()<br />{<br /> var fieldNameToBeAutoSet = "File ID"; //This is the display name of the field you want to auto-set<br /> var queryStringParameterName = "ItemId"; //This is the query string key name you will be retrieving the ID from<br /> var idToBeSet = getParameterByName(queryStringParameterName);<br /> if(idToBeSet)//only run the auto-set if it's been passed to us via query string<br /> {<br /> var lookupControl = getField('select',fieldNameToBeAutoSet);<br /> if(lookupControl) <br /> {<br /> setSelectValue(lookupControl, idToBeSet);<br /> } <br /> else<br /> {<br /> lookupControl = getField('input', fieldNameToBeAutoSet);<br /> if(false === lookupControl)<br /> {<br /> alert('Unable to get dropdown named ' + fieldNameToBeAutoSet);</span><br />
<span style="color: #ea9999;"> }<br /> else<br /> {<br /> //Set query string value to lookup filed when lookup items more than 20 and removed other values from dropdown.<br /> lookupControl.setAttribute('choices',idToBeSet + '|' + idToBeSet);<br /> lookupControl.value = idToBeSet;<br /> lookupControl.selected = true;</span><br />
<span style="color: #ea9999;"> }<br /> <br /> <br /> }<br /> }<br />}<br /> _spBodyOnLoadFunctionNames.push('attemptToSetField');</span></div>
bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com0tag:blogger.com,1999:blog-1868323741607169039.post-56751545576296245562013-07-17T02:08:00.000-07:002013-07-17T02:09:55.201-07:00“Failed to get value of the “Attachments” column from the “Attachments” field type control. See details in log. Exception message: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)” <div dir="ltr" style="text-align: left;" trbidi="on">
The attachment issue comes after customization of <strong>NewForm.aspx/EditForm.aspx</strong> page. After Customizing page even you have not attached any attachement the following error message showing on click of save button:-<br />
“Failed to get value of the “Attachments” column from the “Attachments” field type control. See details in log. Exception message: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)” <br />
<br />
Resolution:-<br />
Disabled attachment option from list<br />
Go to list --> settings --> advance settings ---> disable attachments.<br />
<br />
OR<br />
<br />
If you want the attachment column to be present, open page in sharepoint designer and findout the below tag and replace it....<br />
<br />
<TemplateName xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm"><span style="background-color: yellow;"><span style="background-color: #f4cccc;">ListForm</span></span><span style="background-color: white;"></TemplateName></span><br />
<br />
To<br />
<br />
<TemplateName xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm"><span style="background-color: yellow;"><span style="background-color: #f4cccc;">ListForm2</span></span><span style="background-color: white;"></TemplateName></span></div>
bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com5tag:blogger.com,1999:blog-1868323741607169039.post-58731191270913542762013-07-05T02:49:00.000-07:002013-07-05T02:49:07.105-07:00SharePoint Lookup field: - Behaves differently when items greater than 20<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;">SharePoint Lookup field: - Behaves differently when items greater than 20<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: Calibri;">Lookup column having less than 20 items:<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;">If your lookup column having 20 or less items, the lookup column rendered like a normal dropdown filed (i.e. if you checked the source code of the page, you will get HTML tag <Select title=”File ID”…..) as shown in below images.<o:p></o:p></span></div>
<div class="MsoListParagraph" style="margin: 0cm 0cm 10pt 36pt; mso-list: l0 level1 lfo1; text-indent: -18pt;">
<span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">1.</span><span style="font: 7pt 'Times New Roman';"> </span></span></span><span style="font-family: Calibri;">The below image showing no. of items less than 20</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-ZqiDL4zBoSk/UdaWDAnmQxI/AAAAAAAAAJ8/sPu1ciQssyU/s623/Item+Less+than+20.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="235" oya="true" src="http://2.bp.blogspot.com/-ZqiDL4zBoSk/UdaWDAnmQxI/AAAAAAAAAJ8/sPu1ciQssyU/s320/Item+Less+than+20.png" width="320" /></a></div>
<span style="font-family: Calibri;"><o:p><div class="MsoListParagraph" style="margin: 0cm 0cm 10pt 36pt; mso-list: l0 level1 lfo1; text-indent: -18pt;">
<span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt 'Times New Roman';"> </span></span></span>The below image showing source code for the page</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-nYBvzf_lrSg/UdaWN7YaFqI/AAAAAAAAAKE/IV68-3TMdrY/s1030/Item+Less+than+20+source+.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="111" oya="true" src="http://4.bp.blogspot.com/-nYBvzf_lrSg/UdaWN7YaFqI/AAAAAAAAAKE/IV68-3TMdrY/s320/Item+Less+than+20+source+.PNG" width="320" /></a></div>
<div class="MsoListParagraph" style="margin: 0cm 0cm 10pt 36pt; mso-list: l0 level1 lfo1; text-indent: -18pt;">
<br /></div>
<o:p><div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<b style="mso-bidi-font-weight: normal;">Lookup column having more than 20 items:<o:p></o:p></b></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
If your lookup column is having more than 20 items, the source code automatically changed and complicated in IE browser. In FireFox and other browsers the lookup column with more than 20 items still gets same HTML source i.e. <Select tag . <span style="mso-spacerun: yes;"> </span>The images are shown in below:<o:p></o:p></div>
<div class="MsoListParagraph" style="margin: 0cm 0cm 10pt 36pt; mso-list: l0 level1 lfo1; text-indent: -18pt;">
<span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">1.<span style="font: 7pt 'Times New Roman';"> </span></span></span>The below image showing no. of items greater than 20<o:p></o:p></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/--q8p6EDn8xU/UdaWUYo85rI/AAAAAAAAAKM/W3fUNUJca9A/s622/Items+greater+than+20.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="237" oya="true" src="http://2.bp.blogspot.com/--q8p6EDn8xU/UdaWUYo85rI/AAAAAAAAAKM/W3fUNUJca9A/s320/Items+greater+than+20.png" width="320" /></a></div>
<div class="MsoListParagraph" style="margin: 0cm 0cm 10pt 36pt; mso-list: l0 level1 lfo1; text-indent: -18pt;">
<span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;">2.<span style="font: 7pt 'Times New Roman';"> </span></span></span>The below image showing source code for the page</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-o6huq5vZ9vA/UdaWccbXnQI/AAAAAAAAAKU/vJx2G8HcXC4/s1325/Item+Greater+than+20+Source.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="38" oya="true" src="http://1.bp.blogspot.com/-o6huq5vZ9vA/UdaWccbXnQI/AAAAAAAAAKU/vJx2G8HcXC4/s320/Item+Greater+than+20+Source.PNG" width="320" /></a></div>
<o:p><div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
When lookup column has more than 20 items in IE it gets generated INPUT text box with an image. The input field on the other hand having lots of event handler like onfocusout, onkeypress, onkeydown. One of the attributes of input tag is also “Choices” which contains all the ids and values of lookup separated by “|” character. The image next to Input field has an “Onclick” event that triggers the select and selected value pass to the attribute “Value”.<o:p></o:p></div>
</o:p></o:p></o:p></span></div>
bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com0tag:blogger.com,1999:blog-1868323741607169039.post-16314585351470361752013-04-30T04:57:00.000-07:002013-04-30T05:00:13.999-07:00Remove hyperlink from lookup column in Dataview webpart in Sharepoint 2010<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: black; font-family: 'Verdana','sans-serif'; font-size: 10pt;">When you used lookup column in the list and implemented it in custom dataview webpart, the hyperlink appears on the lookup field value.<o:p></o:p></span><br />
<br />
<span style="color: black; font-family: 'Verdana','sans-serif'; font-size: 10pt;">To remove the link from lookup field used the following tag:-<o:p></o:p></span><br />
<br />
<span style="color: black; font-family: 'Verdana','sans-serif'; font-size: 10pt;">Just you have to replace with<o:p></o:p></span><br />
<br />
<span style="color: blue; font-family: 'Verdana','sans-serif'; font-size: 10pt;"><</span><span style="color: #a31515; font-family: 'Verdana','sans-serif'; font-size: 10pt;">xsl</span><span style="color: blue; font-family: 'Verdana','sans-serif'; font-size: 10pt;">:</span><span style="color: #a31515; font-family: 'Verdana','sans-serif'; font-size: 10pt;">value-of</span><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"> <span style="color: red;">disable-output-escaping</span><span style="color: blue;">="yes"</span> <span style="color: red;">select</span><span style="color: blue;">="@Teams"/></span></span><o:p></o:p><br />
<br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">By: </span><o:p></o:p><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><br /><span style="color: blue;"><</span><span style="color: #a31515;">xsl</span><span style="color: blue;">:</span><span style="color: #a31515;">value-of</span> <span style="color: red;">disable-output-escaping</span><span style="color: blue;">="yes"</span> </span><span style="color: red; font-family: 'Verdana','sans-serif';">select</span><span style="color: blue; font-family: 'Verdana','sans-serif'; font-size: 10pt;">="substring-after(substring-before(substring-after(@Teams, 'ID='), '&lt;'), '&gt;')"/></span><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><o:p></o:p></span><br />
<br />
<br />
<span style="color: black; font-family: 'Verdana','sans-serif'; font-size: 10pt;">If you have added <b style="mso-bidi-font-weight: normal;">multiple selection lookup</b> value in your list, and you want to remove hyperlink from field, the above trick will not work. For that we required to more customise the XSLT and used the following code:-<o:p></o:p></span><br />
<br />
<span style="color: black; font-family: 'Verdana','sans-serif'; font-size: 10pt;">In multiple selection lookup value shows in data view web part:-<o:p></o:p></span><br />
<br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><a href="http:///#">Team1</a>; <a href="http:///#"><span id="goog_167270009"></span>Team<span id="goog_167270010"></span></a>2; <a href="http:///#">Team3</a>; <a href="http:///#">Team4<o:p></o:p></a></span><br />
<br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">We will format it to:-<o:p></o:p></span><br />
<br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">Team1<o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">Team2<o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">Team3<o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">Team4<o:p></o:p></span><br />
<br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">Using the following code:-<o:p></o:p></span><br />
<br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">Add the below template to your data view web part:-<o:p></o:p></span><br />
<br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><!—Semicolon delimit start -- ><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:template name="string-replace-all"><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:param name="text" /><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:param name="replace" /><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:param name="by" /><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:choose><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:when test="contains($text, $replace)"><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:value-of select="substring-before($text,$replace)" /><span style="mso-tab-count: 2;"> </span><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:value-of select="$by" /><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:call-template name="string-replace-all"><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:with-param name="text" select="substring-after($text,$replace)" /><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:with-param name="replace" select="$replace" /><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:with-param name="by" select="$by" /><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"></xsl:call-template><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"></xsl:when><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:otherwise><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:value-of select="$text" /><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"></xsl:otherwise><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"></xsl:choose><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"></xsl:template><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><!—Semicolon delimit End -- ><o:p></o:p></span><br />
<br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><!—Remove Hyperlink start-- ><o:p></o:p></span><br />
<br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:template name="deleteAnchorTags"><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:param name="Anchor"/><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:choose><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:when test="contains($Anchor, '&lt;')"> <span style="mso-tab-count: 4;"> </span><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:value-of select="substring-before($Anchor, '&lt;')"/><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:call-template name="deleteAnchorTags"><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:with-param name="Anchor" select="substring-after($Anchor, '&gt;')"/><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"></xsl:call-template><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"></xsl:when><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:otherwise><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><xsl:value-of select="$Anchor"/><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"></xsl:otherwise><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"></xsl:choose><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"></xsl:template><o:p></o:p></span><br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"><!—Remove Hyperlink End-- ><o:p></o:p></span><br />
<br />
<br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">And replace your tag with:-<o:p></o:p></span><br />
<br />
<span style="color: blue; font-family: 'Verdana','sans-serif'; font-size: 10pt;"><</span><span style="color: #a31515; font-family: 'Verdana','sans-serif'; font-size: 10pt;">xsl</span><span style="color: blue; font-family: 'Verdana','sans-serif'; font-size: 10pt;">:</span><span style="color: #a31515; font-family: 'Verdana','sans-serif'; font-size: 10pt;">value-of</span><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;"> <span style="color: red;">disable-output-escaping</span><span style="color: blue;">="yes"</span> <span style="color: red;">select</span><span style="color: blue;">="@Teams"/></span></span><o:p></o:p><br />
<br />
<span style="font-family: 'Verdana','sans-serif'; font-size: 10pt;">By:-<o:p></o:p></span><br />
<br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt; mso-layout-grid-align: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="font-family: Calibri;"><xsl:variable name="onlyText"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt; mso-layout-grid-align: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="font-family: Calibri;"><xsl:call-template name="deleteAnchorTags"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt; mso-layout-grid-align: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="font-family: Calibri;"><xsl:with-param name="Anchor" select="@Teams" /><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt; mso-layout-grid-align: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="font-family: Calibri;"></xsl:call-template><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt; mso-layout-grid-align: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="font-family: Calibri;"></xsl:variable><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt; mso-layout-grid-align: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;"> </span><xsl:variable name="thisRow"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt; mso-layout-grid-align: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="font-family: Calibri;"><xsl:call-template name="string-replace-all"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt; mso-layout-grid-align: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="font-family: Calibri;"><xsl:with-param name="text" select="$onlyText" /><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt; mso-layout-grid-align: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="font-family: Calibri;"><xsl:with-param name="replace" select="';'" /><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt; mso-layout-grid-align: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="font-family: Calibri;"><xsl:with-param name="by" select="'&lt;br/&gt;'" /><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt; mso-layout-grid-align: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="font-family: Calibri;"></xsl:call-template><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt; mso-layout-grid-align: none;">
<span lang="EN" style="mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;"><span style="font-family: Calibri;"></xsl:variable><o:p></o:p></span></span></div>
<span lang="EN" style="font-family: 'Calibri','sans-serif'; mso-ansi-language: EN; mso-bidi-font-family: Calibri;"><xsl:value-of select="$thisRow" disable-output-escaping="yes"/></span><br />
<br />
<br />
Happy coding..... :-) :-) :-)<br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<br /></div>
</div>
bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com5tag:blogger.com,1999:blog-1868323741607169039.post-78760744778208871982013-01-17T04:05:00.001-08:002013-01-17T04:06:46.737-08:00Ribbon menu missing on page load after customisation<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
</div>
After Customisation in sharepoint pages ribbon menu missing on page load for perticular webpart.<br />
<br />
In sharepoint 2010, if you have more than one webpart on webpart page, the ribbon disappears because SharePoint doesn't know which web part to display ribbon for. This is by design because if you have a document library web part and list web part on the same page, the ribbons are obviously differ for the two and sharepoint needs to know which webpart to display the ribbon for.<br />
<br />
To avoid the above problem use the following javascript.<br />
<br />
<Script><br />
setTimeout(function()<br />
{<br />
<br />
var obj = document.getElementById("MSOZoneCell_WebPartWPQ3");<br />
if(obj != null)<br />
{<br />
<br />
var obj1 = new Array()<br />
<br />
obj1["target"] = obj<br />
<br />
obj1 ["srcElement"] = obj<br />
<br />
WpClick(obj1)<br />
}<br />
},2000)<br />
<br />
</Script></div>
bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com0tag:blogger.com,1999:blog-1868323741607169039.post-12378574290076982032013-01-17T03:44:00.001-08:002013-01-17T03:45:09.839-08:00Overlay calendar items open in new window instead in Modal Popup <div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;">When you create overlay calendar view for combined 2 or 3 views especially for colour coded calendar, if you create event with category and click on it, it will open in popup which is by default function of SharePoint.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;">If you create event without category column value and click on it, it will open in new window. To remove the above problem use the below javascript.<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><script src="/sites/CUEDemo/Code%20Library/jquery-1.8.3.min.js" type="text/javascript"></script><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<br /></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><script type="text/javascript"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;">// load our function to the delayed load list<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>_spBodyOnLoadFunctionNames.push('calendarEventLinkIntercept');<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<br /></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>// hook into the existing SharePoint calendar load function.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>function calendarEventLinkIntercept()<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 2;"> </span>if (SP.UI.ApplicationPages.CalendarNotify.$4a)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 2;"> </span>{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 2;"> </span>var OldCalendarNotify = SP.UI.ApplicationPages.CalendarNotify.$4a;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 2;"> </span>SP.UI.ApplicationPages.CalendarNotify.$4a = function () <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 2;"> </span>{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 2;"> </span>OldCalendarNotify();<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 2;"> </span>bindEventClickHandler();<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 2;"> </span>}<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 2;"> </span>}<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 1;"> </span>if (SP.UI.ApplicationPages.CalendarNotify.$4b)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 2;"> </span>{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 2;"> </span>var OldCalendarNotify = SP.UI.ApplicationPages.CalendarNotify.$4b;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 2;"> </span>SP.UI.ApplicationPages.CalendarNotify.$4b =<span style="mso-spacerun: yes;"> </span>function () <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 2;"> </span>{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 2;"> </span>OldCalendarNotify();<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 2;"> </span>bindEventClickHandler();<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<br /></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 2;"> </span>}<span style="mso-spacerun: yes;"> </span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 1;"> </span>}<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span>// future service pack change may go here!<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span>// if (SP.UI.ApplicationPages.CalendarNotify.???)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>}<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<br /></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>function bindEventClickHandler()<span style="mso-tab-count: 1;"> </span>{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 2;"> </span>$('.ms-acal-rootdiv a').click(function(){EditLink2(this,'WPQ2');return false;});<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"><span style="mso-tab-count: 1;"> </span>}<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<br /></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<br /></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<br /></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;"></script><o:p></o:p></span></div>
</div>
bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com1tag:blogger.com,1999:blog-1868323741607169039.post-67336734354630316882013-01-17T03:38:00.005-08:002013-01-17T03:38:59.628-08:00Avoid Contributor user to edit home page in sharepoint 2012 Team site<div dir="ltr" style="text-align: left;" trbidi="on">
This is contributor permission issue(sharepoint 2012 bug). Normally when you create Sharepoint 2012 team site, the home page by default create under "SitePages" library.<br />
<br />
The contributor users on site can easily modify home page and change setting of webpart and layouts. <br />
The key to that issue is in the description "<strong>customize Web Part Pages in document libraries</strong> ", and it's the "<strong>in document libraries</strong> " that's the problem. When a page is in a library, it is treated as a file or document. If the user has "contribute" or Edit permissions to the library storing the page then they have the right to edit the page.<br />
In 2007 the home page (default.aspx) was stored outside of a library, so "contributors" did not have edit rights by default. In 2010 Team Sites the home page is stored in the SitePages library that inherits permissions from the site, and therefore contributors have edit rights.<br />
The solution is to set custom permissions in the pages library. Just break inheritance and grant your team members View only rights and the Site Owners full control.<br />
<br />
Happy Coding.......... :-)</div>
bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com0tag:blogger.com,1999:blog-1868323741607169039.post-47040029299107495262012-08-09T01:02:00.001-07:002012-08-09T01:02:27.598-07:00SharePoint 2010 Webpart page not showing Quick Launch<div dir="ltr" style="text-align: left;" trbidi="on">
Some times SharePoint 2010 site newly created webpart page, publishing page does not show Quick launch bar(Left navigation panel) on page. It might be hide by some css available on page or some content place holder override by master page. <br />
<br />
To solve the above issue, follow the following steps:-<br />
1) Open your site in sharepoint designer.<br />
2) Open your webpart page in advanced mode.<br />
3) Remove the below content place holder.<br />
<table border="0" cellpadding="0" cellspacing="0"><tbody>
<tr><td class="code"><div class="container">
<div class="line number1 index0 alt2">
<code class="csharp plain"><asp:Content ContentPlaceHolderId=</code><code class="csharp string">"PlaceHolderNavSpacer"</code> <code class="csharp plain">runat=</code><code class="csharp string">"server"</code><code class="csharp plain">> </code></div>
<div class="line number2 index1 alt1">
<code class="csharp plain"></asp:Content> </code></div>
<div class="line number3 index2 alt2">
<code class="csharp plain"><asp:Content ContentPlaceHolderId=</code><code class="csharp string">"PlaceHolderLeftNavBar"</code> <code class="csharp plain">runat=</code><code class="csharp string">"server"</code><code class="csharp plain">> </code></div>
<div class="line number4 index3 alt1">
<code class="csharp plain"></asp:Content></code></div>
<div class="line number4 index3 alt1">
<code class="csharp plain"></code> </div>
<div class="line number4 index3 alt1">
<code class="csharp plain">4)Save the page, it will show the Quick launch bar on page. If it is not showing on page, then remove the below CSS available on page:-</code></div>
<div class="line number4 index3 alt1">
<code class="csharp plain"><table border="0" cellpadding="0" cellspacing="0"><tbody>
<tr><td class="code"><div class="container">
<div class="line number1 index0 alt2">
<code class="css plain"></code> </div>
<div class="line number1 index0 alt2">
<code class="css plain"><style type=</code><code class="css string">"text/css"</code><code class="css plain">> </code></div>
<div class="line number2 index1 alt1">
<code class="css plain">body #s</code><code class="css value">4</code><code class="css plain">-leftpanel { </code></div>
<div class="line number3 index2 alt2">
<code class="css spaces"> </code><code class="css keyword">display</code><code class="css plain">:</code><code class="css value">none</code><code class="css plain">; </code></div>
<div class="line number4 index3 alt1">
<code class="css plain">} </code></div>
<div class="line number5 index4 alt2">
<code class="css plain">.s</code><code class="css value">4</code><code class="css plain">-ca { </code></div>
<div class="line number6 index5 alt1">
<code class="css spaces"> </code><code class="css keyword">margin-left</code><code class="css plain">:</code><code class="css value">0px</code><code class="css plain">; </code></div>
<div class="line number7 index6 alt2">
<code class="css plain">} </code></div>
<div class="line number8 index7 alt1">
<code class="css plain"></style></code></div>
</div>
</td></tr>
</tbody></table>
</code></div>
</div>
<br />
5) Save the page, quick launch bar appear on page.</td></tr>
</tbody></table>
<br />
</div>bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com2tag:blogger.com,1999:blog-1868323741607169039.post-77137694585337694892012-03-08T03:30:00.002-08:002012-03-08T03:30:07.580-08:00Disabled print option for SharePoint page<div dir="ltr" style="text-align: left;" trbidi="on"><br />
<div class="yiv404925621msonormal" style="background: white; line-height: 11.25pt; margin-bottom: .0001pt; margin: 0in;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">If you want to prevent user from printing SharePoint site page, you can use the below script in CEWB on your SharePoint site. <o:p></o:p></span></div><div class="yiv404925621msonormal" style="background: white; line-height: 11.25pt; margin-bottom: .0001pt; margin: 0in;"><br />
</div><div class="yiv404925621msonormal" style="background: white; line-height: 11.25pt; margin-bottom: .0001pt; margin: 0in;"><br />
</div><div class="yiv404925621msonormal" style="background: white; line-height: 11.25pt; margin-bottom: .0001pt; margin: 0in;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">//Disabled File print and ctrl + P<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"><style type="text/css" media="print"><o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">body { visibility: hidden; display: none }<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"></style><o:p></o:p></span></div><div class="yiv404925621msonormal" style="background: white; line-height: 11.25pt; margin-bottom: .0001pt; margin: 0in;"><br />
</div><div class="yiv404925621msonormal" style="background: white; line-height: 11.25pt; margin-bottom: .0001pt; margin: 0in;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">The above JavaScript is not totally disabled the CTRL + P or Print option from browser File option. </span><span style="background: white; color: #333333; font-family: "Verdana","sans-serif"; font-size: 9.0pt;">It tells the browser that if this Web page is set to print, switches the body to display nothing. Then, all that will print will be the standard header and/or footer that the browser appends to printed pages.</span><span style="font-family: Arial, sans-serif; font-size: 10pt;"> The user always get printed page with heading and blank page.<o:p></o:p></span></div></div>bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com0tag:blogger.com,1999:blog-1868323741607169039.post-66502353404344823002012-03-08T03:20:00.002-08:002012-03-08T03:20:38.707-08:00Disabled Right click, CTRL + A, C, V using JavaScript in SharePoint<div dir="ltr" style="text-align: left;" trbidi="on"><br />
<div class="yiv404925621msonormal" style="background: white; line-height: 11.25pt; margin-bottom: .0001pt; margin: 0in;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">You want user to avoid copy, Paste data from SharePoint site, use the below script in CEWB. It will prevent user to right click, and Copy, Paste data from SharePoint page<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><br />
</div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"><script type="text/javascript"><o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> var message="Sorry, you do not have permission to right click.";<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><br />
</div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> function clickIE4(){<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> if (event.button==2){<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> alert(message);<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> return false;<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> }<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> }<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><br />
</div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> function clickNS4(e){<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> if (document.layers||document.getElementById&&!document.all){<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> if (e.which==2||e.which==3){<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> alert(message);<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> return false;<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> }<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> }<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> }<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> if (document.layers){<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> document.captureEvents(Event.MOUSEDOWN);<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> document.onmousedown=clickNS4;<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> }<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> else if (document.all&&!document.getElementById){<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> document.onmousedown=clickIE4;<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> }<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> document.oncontextmenu=new Function("alert(message);return false")<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"></script><o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><br />
</div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"><script language="JavaScript1.2"><o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><br />
</div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">function disableselect(e){<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">return false<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">}<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><br />
</div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">function reEnable(){<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">return true<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">}<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><br />
</div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">//if IE4+<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">document.onselectstart=new Function ("return false")<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><br />
</div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">//if NS6<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">if (window.sidebar){<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">document.onmousedown=disableselect<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">document.onclick=reEnable<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">}<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"></script><o:p></o:p></span></div></div>bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com0tag:blogger.com,1999:blog-1868323741607169039.post-66694911162911814652012-03-08T03:15:00.000-08:002012-03-08T03:15:02.620-08:00Auto Log Off after 10 min in SharePoint site<div dir="ltr" style="text-align: left;" trbidi="on"><br />
<div class="yiv404925621msonormal" style="background: white; line-height: 11.25pt; margin-bottom: .0001pt; margin: 0in;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">Some time users are required auto log off the SharePoint site after particular time for security. Here is JavaScript to add in CEWB on page.<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background: white; line-height: 11.25pt; margin-bottom: .0001pt; margin: 0in;"><br />
</div><div class="yiv404925621msonormal" style="background: white; line-height: 11.25pt; margin-bottom: .0001pt; margin: 0in;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">You can set time in JavaScript and called the default Sign Out page of SharePoint. If you want to set auto log off for one particular page, set the below JavaScript function in CEWB on that page, otherwise for whole SharePoint site add the JavaScript function on master page.</span></div><div class="yiv404925621msonormal" style="background: white; line-height: 11.25pt; margin-bottom: .0001pt; margin: 0in;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"><br />
</span></div><div class="yiv404925621msonormal" style="background: white; line-height: 11.25pt; margin-bottom: .0001pt; margin: 0in;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"><script type="text/javascript"><o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">//Added for Auto LogOFF after 10 min<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><br />
</div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><br />
</div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> function Timeout(){<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> var t = setTimeout("RedirectToLogout()", 10*60000);<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> }<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> function RedirectToLogout(){<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> var path = "</span><span class="yshortcuts"><u><span style="color: purple; font-family: "Arial","sans-serif"; font-size: 10.0pt;"><a href="http://yousite/_layouts/SignOut.aspx" style="outline-color: initial; outline-style: none; outline-width: initial;">http://YouSite/_layouts/SignOut.aspx</a></span></u></span><span style="font-family: Arial, sans-serif; font-size: 10pt;">";<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> window.navigate(path);<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> }<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> </script><o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"><script><o:p></o:p></span></div><div class="yiv404925621msonormal" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; line-height: 11.25pt; margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; outline-color: initial; outline-style: none; outline-width: initial; text-align: -webkit-auto;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"> window.onload=Timeout;<o:p></o:p></span></div><div class="yiv404925621msonormal" style="background: white; line-height: 11.25pt; margin-bottom: .0001pt; margin: 0in;"><span style="background-color: white; font-family: Arial, sans-serif; font-size: 10pt; line-height: 11.25pt; text-align: -webkit-auto;"></script></span></div><div class="yiv404925621msonormal" style="background: white; line-height: 11.25pt; margin-bottom: .0001pt; margin: 0in;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"><br />
</span></div><div class="yiv404925621msonormal" style="background: white; line-height: 11.25pt; margin-bottom: .0001pt; margin: 0in;"><span style="font-family: Arial, sans-serif; font-size: 10pt;"><br />
</span></div><div class="yiv404925621msonormal" style="background: white; line-height: 11.25pt; margin-bottom: .0001pt; margin: 0in;"><span style="font-family: Arial, sans-serif; font-size: 10pt;">Happy Coding <o:p></o:p></span></div></div>bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com2tag:blogger.com,1999:blog-1868323741607169039.post-71361941120649755122011-08-03T08:49:00.000-07:002011-08-03T08:49:38.693-07:00Recover SharePoint Site from suspect database<div dir="ltr" style="text-align: left;" trbidi="on"><span class="Apple-style-span" style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;"> When Central Administration in SharePoint 2010 stops abruptly and its Content/Config database switches itself automatically to <b>Suspect</b> mode for no apparent reason, that too after a very stressful and super-hard working day for me.</span><br />
<span class="Apple-style-span" style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;"><br />
</span><br />
<span class="Apple-style-span" style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;">To recover your sharepoint site from suspect database use following steps:-</span><br />
<span class="Apple-style-span" style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;"><br />
</span><br />
<span class="Apple-style-span" style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;">1. Go to your MSSQL\Data files that reside under: C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA</span><div><span class="Apple-style-span" style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;"><br />
</span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;">2. Identify your Central Admin Content Database name in my case it got screwed up and was in the suspect: mode: so this is my content database name </span><span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 16px;">WSS_Content_13885.</span></div><div><span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 16px;"><br />
</span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;"><b>NOTE: </b>Please take a backup of the corrupted .mdf and .ldf files, before following other steps</span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;"><br />
</span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;">3. Open your SQL Server Management Studio ->, New Query and it opens up your SQL Query editor, copy and paste the query below and change the highlighted to your database name</span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;"><br />
</span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;">--Verify whether Database has any issues<br />
EXEC sp_resetstatus </span><span class="Apple-style-span" style="color: red;"><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;">"</span><span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 16px;">WSS_Content_13885</span></span><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;"><span class="Apple-style-span" style="color: red;">"</span><br />
<br />
<span class="Apple-style-span" style="color: #333333;">---Alter database and put it on Emergency Mode</span><br />
<span class="Apple-style-span" style="color: #333333;">ALTER DATABASE </span><span class="Apple-style-span" style="color: red;">"</span></span><span class="Apple-style-span" style="color: red;"><span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 16px;">WSS_Content_13885</span><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;">"</span></span><span class="Apple-style-span" style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;"> SET EMERGENCY<br />
DBCC checkdb</span><span class="Apple-style-span" style="color: red;"><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;">('</span><span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 16px;">WSS_Content_13885</span></span><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;"><span class="Apple-style-span" style="color: red;">')</span><br />
<br />
<span class="Apple-style-span" style="color: #333333;">--Set the database in the Single User mode</span><br />
<span class="Apple-style-span" style="color: #333333;">ALTER DATABASE </span><span class="Apple-style-span" style="color: red;">"</span></span><span class="Apple-style-span" style="color: red;"><span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 16px;">WSS_Content_13885</span><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;">"</span></span><span class="Apple-style-span" style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;"> SET SINGLE_USER WITH ROLLBACK IMMEDIATE<br />
<br />
--Repair the database and allow data loss<br />
DBCC CheckDB</span><span class="Apple-style-span" style="color: red;"><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;">('</span><span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 16px;">WSS_Content_13885</span><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;">'</span></span><span class="Apple-style-span" style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;">,REPAIR_ALLOW_DATA_LOSS)<br />
<br />
--Set the database back to Multi-User mode<br />
ALTER DATABASE </span><span class="Apple-style-span" style="color: red;"><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;">"</span><span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 16px;">WSS_Content_13885</span><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;">"</span></span><span class="Apple-style-span" style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;"> SET MULTI_USER<br />
<br />
--Ensure Database is reset<br />
EXEC sp_resetstatus </span><span class="Apple-style-span" style="color: red;"><span class="Apple-style-span" style="font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;">,</span><span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 16px;">WSS_Content_13885'.</span></span></div><div><span class="Apple-style-span" style="color: red;"><span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 16px;"><br />
</span></span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Arial, sans-serif; font-size: 13px; line-height: 16px;">Execute all the commands in your SQL Query Editor and there you go, Go back to your SQL Management Studio and you can see that the (Suspect) mode issue against the Content/Config database is fixed and the database got fully repaired and restored.<br />
<br />
To verify the same, hit your Central Administration and it starts working just fine...</span></div></div>bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com6tag:blogger.com,1999:blog-1868323741607169039.post-35516021027782112392010-12-16T06:50:00.000-08:002010-12-16T06:58:17.850-08:00How to identify a SharePoint Site?We have lot of websites in internet and many of them are in SharePoint. So if you see any good looking site on internet and you want to check whether it is sharepoint based site or not?<br />
<br />
There are some really cool exceptional ways.<br />
<br />
Take "View Source" from any browser of your site. You will see something like <head> <meta name = "Generator" content="Microsoft SharePoint"/><br />
<br />
Dont forget to check Javascript section just after <Title><br />
<br />
You will see reference JS from src="/_layouts/1033/init.js"<br />
<br />
If its SharePoint site there are also webservice with it. You can call any of webservice (If banned you will see "Unknown Error" page). e.g <a href="http://sharepointsite.microsoft.com/_layouts/Lists.asmx">http://SharePointSite.Microsoft.com/_layouts/Lists.asmx</a> .<br />
<br />
Otherway is check images folder available in 12 hive folder(e.g. <a href="http://sharepointsite.microsoft.com/_layouts/images/accesssetting.gif">http://SharepointSite.Microsoft.com/_layouts/images/accesssetting.gif</a>), it will show you image available in 12 hive folder.<br />
<span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; border-collapse: separate; color: black; font: small 'Times New Roman'; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px; text-align: left;"> </span></span>bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com0tag:blogger.com,1999:blog-1868323741607169039.post-32597118721411272572010-12-13T08:06:00.000-08:002010-12-13T08:06:42.928-08:00Session State Error in SharePoint 2010<span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; border-collapse: separate; color: #333333; font: 14px 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-style-span" style="font-family: Tahoma; font-size: 12px; line-height: 18px;"><em>ASP.NET session state</em><span class="Apple-converted-space"> </span>may be used on SharePoint 2010 pages. This service is automatically disabled in normal installations of SharePoint 2010. To enable session State in SP 2010 follow beleow steps:-</span></span><br />
<ol><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; border-collapse: separate; color: #333333; font: 14px 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-style-span" style="font-family: Tahoma; font-size: 12px; line-height: 18px;"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; border-collapse: separate; color: #333333; font: 14px 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-style-span" style="font-family: Tahoma; font-size: 12px; line-height: 18px;"><ul style="list-style-type: decimal;"><li>Enter the following PowerShell command in the SharePoint 2010 Management Shell window:<pre>Enable-SPSessionStateService –DefaultProvision.</pre></li>
<li><pre>Steps for PowerShell:-</pre></li>
<li><pre>Go to all programs-->Microsoft SharePoint 2010 products-->SharePoint 2010 Managment Shell.</pre></li>
<li>On each web application for which you want to use session state, edit the web.config file and set the enableSessionState property of the pages element as follows:<pre><pages enableSessionState="true".</pre></li>
</ul></span></span></span></span></ol>bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com1tag:blogger.com,1999:blog-1868323741607169039.post-86217803546491303872010-12-10T04:22:00.000-08:002010-12-10T04:22:19.982-08:00Session Error occur on SharePoint SiteSome times Session error occur on your sharepoint portal server when installing asp.net project/User Control on SharePoint Server. The user control handling some session value on that page.<br />
<br />
To overcome the error used following steps:-<br />
<div class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">1.</span><span style="font-family: 'Times New Roman';"> </span></span></span><span style="font-family: Calibri;">Go to Central Admin </span><span style="font-family: Wingdings; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-char-type: symbol; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-symbol-font-family: Wingdings;"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings;">à</span></span><span style="font-family: Calibri;"> Application Management </span><span style="font-family: Wingdings; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-char-type: symbol; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-symbol-font-family: Wingdings;"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings;">à</span></span><span style="font-family: Calibri;"> Configure Session State </span><span style="font-family: Wingdings; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-char-type: symbol; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-symbol-font-family: Wingdings;"><span style="mso-char-type: symbol; mso-symbol-font-family: Wingdings;">à</span></span><span style="font-family: Calibri;"> enabled session state.</span></div><div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span class="apple-style-span"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">2.</span><span style="font-family: 'Times New Roman';"> </span></span></span></span><span class="apple-style-span"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;">From a command prompt, navigate to the Microsoft.NET 2.0 Framework directory</span><span style="font-family: Calibri;">(C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG).</span></span><br />
</span></div><div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span class="apple-style-span"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">3.</span><span style="font-family: 'Times New Roman';"> </span></span></span></span><span class="apple-style-span"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;">Open web.config file and modified as follows:-</span></span></div><div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span class="apple-style-span"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">4.</span><span style="font-family: 'Times New Roman';"> </span></span></span></span><span class="apple-style-span"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;">Uncomment the line:</span><span style="font-family: Calibri;">- <add name=”Session” type=”System.Web.SessionState.SessionStateModule” /></span></span></span><br />
</span></div><div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span class="apple-style-span"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">5.</span><span style="font-family: 'Times New Roman';"> </span></span></span></span><span class="apple-style-span"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;">Modified the line:- <pages /></span><span style="font-family: Calibri;"> to <pages enableSessionState=”<b>true</b>” … /></span></span></span><br />
</span></div><div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span class="apple-style-span"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">6.</span><span style="font-family: 'Times New Roman';"> </span></span></span></span><span class="apple-style-span"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;">From a command prompt:- change c:\Documents and setting… to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727</span></span></div><div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span class="apple-style-span"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">7.</span><span style="font-family: 'Times New Roman';"> </span></span></span></span><span class="apple-style-span"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;">Run the command:- aspnet_regsql.exe -S </span></span><span class="apple-converted-space"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;"> </span></span><span class="apple-style-span"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;"><server_name> </span></span><span class="apple-converted-space"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;"> </span></span><span class="apple-style-span"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;">-d <database_name> </span></span><span class="apple-converted-space"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;"> </span></span><span class="apple-style-span"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;">-ssadd </span></span><span class="apple-converted-space"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;"> </span></span><span class="apple-style-span"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;">-sstype c </span></span><span class="apple-converted-space"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;"> </span></span><span class="apple-style-span"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;">-E</span></span><br />
</span></div><div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span class="apple-style-span"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">8.</span><span style="font-family: 'Times New Roman';"> </span></span></span></span><span class="apple-style-span"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;">Where server name = is the database server where your database is located</span><span style="font-family: Calibri;"> (Mentioned in error page).</span></span><br />
</span></div><div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span class="apple-style-span"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">9.</span><span style="font-family: 'Times New Roman';"> </span></span></span></span><span class="apple-style-span"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;">Where database name = is the content database of your shared services provider</span><span style="font-family: Calibri;">(Mentioned in error page.</span></span><br />
</span></div><div class="MsoListParagraphCxSpLast" style="margin: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;"><span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">10.</span><span style="font-family: 'Times New Roman';"> </span></span></span><span class="apple-style-span"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; line-height: 115%;">Make IISReset.</span></span></div>bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com0tag:blogger.com,1999:blog-1868323741607169039.post-28365826826674500852010-10-26T03:10:00.000-07:002010-10-26T03:10:01.159-07:00Calculated columns cannot contain volatile functions like Today and MeWhen you trying to add calculated formula in list based on current date. You add '[Today]' in your formula and you give error like:- "<span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;">Calculated columns cannot contain volatile functions like Today and Me". See image below:-</span><br />
<span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;"><br />
</span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/_YBJd5RWhodE/TMam5E0CFYI/AAAAAAAAABA/EBtnGlbfpsc/s1600/img1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="124" src="http://4.bp.blogspot.com/_YBJd5RWhodE/TMam5E0CFYI/AAAAAAAAABA/EBtnGlbfpsc/s320/img1.png" width="320" /></a></div><span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;">To solve this error use following steps:-</span><br />
<br />
<ol><li><span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;">Open up the List Settings page where you want this column.</span></li>
<li><span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;">Create column named “Today”. The type doesn’t matter here, so let type as “Single Line of Text” and just click “Ok”</span><span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;"> </span></li>
</ol><br />
<a href="http://4.bp.blogspot.com/_YBJd5RWhodE/TManSq40Y8I/AAAAAAAAABE/iwh-eRfIfB8/s1600/img2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/_YBJd5RWhodE/TManSq40Y8I/AAAAAAAAABE/iwh-eRfIfB8/s1600/img2.png" /></a><span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;"><br />
</span><br />
<div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div>3. <span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;">Now create the calculated column where you need to use current date within formula and add “Today” from available columns.</span></div><div><span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/_YBJd5RWhodE/TManxUdvlaI/AAAAAAAAABI/_Wy2ywooAJM/s1600/img3.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/_YBJd5RWhodE/TManxUdvlaI/AAAAAAAAABI/_Wy2ywooAJM/s320/img3.png" width="249" /></a></div><div><span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;"><br />
</span></div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div><br />
</div><div>4.<span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;">Once this is done, we no longer need that our own generated column “Today” so you can delete it (Although when you need to edit formula you will need this again, so either recreate this dummy Today field or make it hidden using code behind. Otherwise SharePoint will put you again on that error screen).</span></div><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/_YBJd5RWhodE/TMaoehm0ymI/AAAAAAAAABM/O1lqIrS4G_M/s1600/img4.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="74" src="http://1.bp.blogspot.com/_YBJd5RWhodE/TMaoehm0ymI/AAAAAAAAABM/O1lqIrS4G_M/s320/img4.png" width="320" /></a></div><div><span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;"><br />
</span></div><div><span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;"><br />
</span></div><div><span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;"><br />
</span></div><div><span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;"><br />
</span></div><div><span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;"><br />
</span></div><div><span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;"><br />
</span></div><div><span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;">5.</span><span class="Apple-style-span" style="font-family: 'Lucida Sans Unicode', Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;">For calculated fields, calculated value is stored in Database when item is created at first time and doesn’t change until item is edited. So using Today doesn’t means each time you will get value re-calculated as per actual today’s date. For that it is better to use Computed column.</span></div>bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com1tag:blogger.com,1999:blog-1868323741607169039.post-88857606421572466072010-10-21T03:55:00.000-07:002010-10-21T04:00:07.055-07:00"Errors were found when compiling the workflow.The workflow files were saved but cannot be run."<div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-bidi-language: MR; mso-fareast-font-family: 'Times New Roman';">When you create workflow using sharepoint designer tool and you get the following error:-</span></div><div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-bidi-language: MR; mso-fareast-font-family: 'Times New Roman';"> "<b>Errors were found when compiling the workflow.The workflow files were saved but cannot be run</b>." and if you click on details button you get message "</span><b><i><span style="color: #333333; font-family: 'inherit','serif'; font-size: 10pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt; mso-bidi-language: MR; mso-fareast-font-family: 'Times New Roman';">Unexpected error on server associating the workflow"</span></i></b><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-language: MR; mso-fareast-font-family: 'Times New Roman';">.</span><span style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-bidi-language: MR; mso-fareast-font-family: 'Times New Roman';"></span></div><div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-language: MR; mso-fareast-font-family: 'Times New Roman';">The problem with your web.config file. If you install some third party workflow tool(e.g Nintext,Sogeti,EdinKapic) and unistall it, referrence dll not removed from your web.config file. </span><span style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-bidi-language: MR; mso-fareast-font-family: 'Times New Roman';"></span></div><div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><br />
</div><div class="MsoNormal" style="line-height: normal; margin: 0in 0in 0pt;"><span style="color: #333333; font-family: 'Verdana','sans-serif'; font-size: 10pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-language: MR; mso-fareast-font-family: 'Times New Roman';">To remove error use following steps:-</span><span style="font-family: 'Times New Roman','serif'; font-size: 12pt; mso-bidi-language: MR; mso-fareast-font-family: 'Times New Roman';"></span></div><ol type="1"><li class="MsoNormal" style="color: #333333; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-language: MR; mso-fareast-font-family: 'Times New Roman';">Open your web.config file in Visual studio.</span></li>
<li class="MsoNormal" style="color: #333333; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-language: MR; mso-fareast-font-family: 'Times New Roman';">Go to "<System.Workflow.ComponentModel.WorkflowCompiler>" </span></li>
<li class="MsoNormal" style="color: #333333; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-language: MR; mso-fareast-font-family: 'Times New Roman';">The third party workflow tool reference available here. e.g. Sogeti.Workflow tool</span></li>
<li class="MsoNormal" style="color: #333333; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-language: MR; mso-fareast-font-family: 'Times New Roman';"><authorizedType Assembly="Sogeti.Workflow.Activities,Version=1.0.0.0, Culture=neutral, PublicKeyToken=1cdaea2144644b9c" Namespace="Sogeti.Workflow" TypeName="*" Authorized="True" /></span></li>
<li class="MsoNormal" style="color: #333333; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-language: MR; mso-fareast-font-family: 'Times New Roman';">Comment the third party tool reference, you uninstall previously.</span></li>
<li class="MsoNormal" style="color: #333333; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-language: MR; mso-fareast-font-family: 'Times New Roman';">Save web.config file and reset server.</span></li>
<li class="MsoNormal" style="color: #333333; line-height: normal; margin: 0in 0in 10pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;"><span style="font-family: 'Verdana','sans-serif'; font-size: 10pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-language: MR; mso-fareast-font-family: 'Times New Roman';">Now your workflow run normally.</span></li>
</ol><div class="MsoNormal" style="margin: 0in 0in 10pt;"><br />
</div>bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com0tag:blogger.com,1999:blog-1868323741607169039.post-84665809501912754352010-10-16T07:10:00.000-07:002010-10-16T07:10:54.009-07:00Difference between SPWeb.Users, SPWeb.AllUsers, SPWeb.SiteUsers<span class="Apple-style-span" style="color: #333333; font-family: georgia, 'Georgia Ref', 'Times New Roman', serif; font-size: 12px; line-height: 20px;"><strong>SiteUsers, AllUsers and Users</strong></span><span class="Apple-style-span" style="color: #333333; font-family: georgia, 'Georgia Ref', 'Times New Roman', serif; font-size: 12px; line-height: 20px;"> </span><span class="Apple-style-span" style="color: #333333; font-family: georgia, 'Georgia Ref', 'Times New Roman', serif; font-size: 12px; line-height: 20px;">are properties of SPWeb Object. But looking to this properties name, its not easy to understand their’s scope. So below is description about this properties:-</span><br />
<span class="Apple-style-span" style="color: #333333; font-family: georgia, 'Georgia Ref', 'Times New Roman', serif; font-size: 12px; line-height: 20px;"><br />
</span><br />
<br />
<ol><li><span class="Apple-style-span" style="color: #333333; font-family: georgia, 'Georgia Ref', 'Times New Roman', serif; font-size: small;"><span class="Apple-style-span" style="font-size: 12px; line-height: 20px;"><span class="Apple-style-span" style="color: #0c2c52; font-family: Arial; font-size: 13px; line-height: 19px;"><strong><span class="Apple-style-span" style="background-color: white;">SPWeb.Users</span></strong> :- </span></span></span><span class="Apple-style-span" style="color: #0c2c52; font-family: Arial; font-size: 13px; line-height: 19px;">This represents the collection of users or user objects who have been explicitly assigned permissions in the Web site . This does not return users who have access through a group.</span></li>
<li><span class="Apple-style-span" style="color: #0c2c52; font-family: Arial; font-size: 13px; line-height: 19px;"><strong><span class="Apple-style-span" style="background-color: white;">SPWeb.AllUsers :-</span></strong></span><span class="Apple-style-span" style="color: #0c2c52; font-family: Arial; font-size: 13px; line-height: 19px;">This gives us the collection of user objects who are either members of the site collection or who have atleast navigated to the site as authenticated members of a domain group in the site.</span></li>
<li><span class="Apple-style-span" style="color: #0c2c52; font-family: Arial; font-size: 13px; line-height: 19px;"><strong><span class="Apple-style-span" style="background-color: white;">SPWeb.SiteUsers :- </span></strong></span><span class="Apple-style-span" style="color: #0c2c52; font-family: Arial; font-size: 13px; line-height: 19px;">This is the collection of all users that belong to the site collection.</span></li>
</ol>bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com0tag:blogger.com,1999:blog-1868323741607169039.post-34584671531619111862010-09-28T07:27:00.001-07:002010-09-28T07:27:44.389-07:00Remove user acess from sharepoint site.<div class="KonaBody">If some user is no longer with company and you want that user not get permission to access SharePoint site and mail go to that particular user.<br />
<br />
If you remove the particular user from AD or disable the account in AD, the mail account also disable and the user not get mail.<br />
<br />
For remove the particular user use following steps:-<br />
<br />
1) Go to Central Administration àApplication Management àPolicy for Web Application <br />
<br />
2) Click on Add Users. Select Web Application for which you want to disable access.<br />
<br />
3) Select Zones as (All Zones) and click on next button.<br />
<br />
4) Add user in Choose user section and select “Deny All – Has no access ”.<br />
<br />
5) Click on Finish.<br />
<br />
6) The particular user not gets access to the particular site collection.<br />
<!-- google_ad_section_end --></div>bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com0tag:blogger.com,1999:blog-1868323741607169039.post-64557992375746020282010-09-23T07:13:00.000-07:002010-09-23T07:13:45.881-07:00Hide/Remove Title Column from List<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Many times i thought that there must be a way to get rid of this Title column, because it's name does not suit the business requirements most of the time.</span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 18px;"><br />
</span></span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 18px;">Better way to hide that column from list. </span></span><span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Follow the steps mentioned below:-</span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"><br />
</span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">1)Go to Your list settings on which you want to hide/remove title column.<br />
2)Go to advanced settings of that list.<br />
3)Click on yes at Allow management of content types.<br />
4)Once you do this, one more setting panel becomes visible in advanced settings options. check out the figure below.</span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">5) Now click on Item content type.</span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">6)Click on Title under section Columns.</span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">7)Select radio button "</span>Hidden (Will not appear in forms)<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">".</span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">8)Click on OK button.</span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">9)The column hide from Add.aspx and Edit.aspx page.</span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">9)Go to AllItem.aspx page and hide column in view also.</span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"><br />
</span>bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com0tag:blogger.com,1999:blog-1868323741607169039.post-1205280577736048202010-09-23T05:59:00.000-07:002010-09-23T05:59:19.542-07:00Remove link on Lookup Field in ListWhen we add lookup column to any list item add item, the link appears on lookup column. If you check the link, link something like "http://Site/ListName<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">/DispForm.aspx?ID=ID of that field>>&RootFolder=*". </span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 18px;"><br />
</span></span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 18px;">we find all the Anchor element of the document and check index of href attributes "</span></span><span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">&RootFolder=*</span><span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">". If you get this attributes simple remove link of lookup.</span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"><br />
</span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Add "Content Editor Web Part" webpart on AddItem.aspx page of list. Add the following javascript in webpart:-</span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"><br />
</span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"><script language="javascript" type="text/javascript"><br />
<br />
_spBodyOnLoadFunctionNames.push("RemoveLookupLinks");<br />
function RemoveLookupLinks()<br />
{<br />
var oP = document.getElementsByTagName('a');//the collection of <a> tags<br />
var flag = false<br />
for(var i=0;i<oP.length;i++)<br />
{<br />
if(oP[i].attributes["href"].value.indexOf("RootFolder=*")!= -1)<br />
{<br />
var linkvalue = oP[i].innerHTML;//value of the lookup field<br />
oP[i].parentNode.innerHTML = linkvalue;//replacing value of the lookup to whole the Anchor tag<br />
flag = true;<br />
break;<br />
}<br />
}<br />
if(flag)<br />
RemoveLookupLinks();<br />
}<br />
</script></span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"><br />
</span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"><br />
</span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 18px;"><br />
</span></span>bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com2tag:blogger.com,1999:blog-1868323741607169039.post-79838815265821946832010-09-23T03:27:00.000-07:002010-09-23T03:27:54.929-07:00Turn Off Send mail option when user add to group.When we add user to group there is an option "Send E-Mail" and the check box by default selected. Many times <br />
on client machine when we add the user to group mail fired to user due to this functionality.<br />
<br />
If you want to turn off "Send Mail" option go through following steps:-<br />
<br />
1)<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Open Program Files -> Common Files -> Microsoft Shared -> Web server</span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">extensions -> 12 -> Template -> Layouts</span> <br />
<br />
2)<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Open</span><span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"> </span><span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"><span class="blsp-spelling-error" id="SPELLING_ERROR_0">AclInv</span></span><span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">.</span><span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"><span class="blsp-spelling-error" id="SPELLING_ERROR_1">aspx</span></span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"><span class="blsp-spelling-error" id="SPELLING_ERROR_1"><br />
</span></span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"><span class="blsp-spelling-error" id="SPELLING_ERROR_1">3) Find </span></span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"><span class="blsp-spelling-error" id="SPELLING_ERROR_1"></span></span><span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 18px;"><wssawc:InputFormCheckBox</span></span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 18px;"> runat="server"</span></span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 18px;">id="chkSendEmail"</span></span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 18px;">Checked="True"</span></span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 18px;">LabelText="<%$Resources:wss,aclver_SendEmailCheckbox%>"</span></span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 18px;">ToggleChildren=true></span></span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 18px;"><br />
</span></span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 18px;">4) By default Checked property is "True". Make it to "False" and save the page.</span></span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 18px;"><br />
</span></span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 18px;">5) When you add user to group the "Send E-Mail" check box now turn off.</span></span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 18px;"><br />
</span></span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 18px;">Happy Coding....................</span></span><br />
<span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"><span class="blsp-spelling-error" id="SPELLING_ERROR_1"><br />
</span></span>bhushan borolehttp://www.blogger.com/profile/00377905120153608707noreply@blogger.com0