Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all 11571 articles
Browse latest View live

Error when editing some Items in SharePoint Custom List

$
0
0

Hello I have a custom list with multiple workflows and a customized infopath form. I am getting an unexpected error on some of the list items when I try to edit them. I can view them just fine but the error is occuring on edit for some items.

I am also able to edit the same item that I am getting the problem with from the datasheet view but just not with infopath form.

I use the USL to view the correlation error and it just said leaving monitored scoped.

I also tried saving the list as a template and creating a new list from the template and then creating a new item in that list and got the same error. Please help.

04/04/2014 11:07:36.72 	w3wp.exe (0x1A84)                       	0x0D3C	SharePoint Foundation         	Runtime                       	tkau	Unexpected	System.ArgumentNullException: Value cannot be null.  Parameter name: s    at System.IO.StringReader..ctor(String s)     at System.Xml.XmlDocument.LoadXml(String xml)     at Microsoft.SharePoint.Publishing.Internal.WorkflowUtilities.FlattenXmlToHashtable(String strXml)     at Microsoft.SharePoint.Publishing.Internal.WorkflowUtilities.DoesWorkflowCancelWhenItemEdited(String associationXml)     at Microsoft.SharePoint.Publishing.WebControls.ConsoleDataSource.EnsurePageNotInLockingWorkflowIfInEditMode()     at Microsoft.SharePoint.Publishing.WebControls.ConsoleDataSource.LoadDataSource()     at Microsoft.SharePoint.Publishing.WebControls.ConsoleDataSource.OnLoad(EventArgs e)     at Microsoft.SharePoint.Publishing.WebControls.XmlConsoleDataSource.OnLoad(EventArgs e)     at Microsoft.SharePoint....	bfecfe90-9ef9-45d4-ae37-355adb4dd2bb
04/04/2014 11:07:36.72*	w3wp.exe (0x1A84)                       	0x0D3C	SharePoint Foundation         	Runtime                       	tkau	Unexpected	...Publishing.WebControls.PublishingSiteActionsMenuCustomizer.OnLoad(EventArgs e)     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)	bfecfe90-9ef9-45d4-ae37-355adb4dd2bb
04/04/2014 11:07:36.75 	w3wp.exe (0x1A84)                       	0x0D3C	SharePoint Foundation         	Monitoring                    	b4ly	Medium  	Leaving Monitored Scope (Request (GET:http://mydomain:Port/Site/Lists/Listname/Item/editifs.aspx?List=c15b9e3c%2D2aac%2D4a84%2D8317%2De3f9358f41bc&ID=144&IsDlg=1&Web=b5b749d6%2D0d3c%2D4cb5%2Daf3a%2D819ff5ceb88c)). Execution Time=75.1751473982343	bfecfe90-9ef9-45d4-ae37-355adb4dd2bb
04/04/2014 11:07:36.78 	w3wp.exe (0x1A84)                       	0x0D3C	SharePoint Foundation         	Monitoring                    	nasq	Medium  	Entering monitored scope (Request (GET:http://mydomain:Port/_catalogs/theme/Themed/7D19B0BC/corev4-8A0ABD2F.css?ctag=0))



20+ Lookup field stopped working

$
0
0

We are using SharePoint Foundation 2010.  The SharePoint functionality that changes a regular dropdown to a lookup when there are 20+ values was working on our production site until very recently and then inexplicably stopped.


a)    If a dropdown contains less than 20 values, SharePoint generates this element using a  <select … /> element with <option />.  See below.

<select name=Name_Client title=Name_Client class=abc-xyz id=Name_Client>
       <option value=0 selected>(None)</option>
       <option value=140>DropDown 1</option>
       <option value=141>DropDown 2</option>
       <option value=142>DropDown 3</option>
       <option value=143>DropDown 4</option>
       <option value=144>DropDown 5</option>
       <option value=145>DropDown 6</option>
       <option value=146>DropDown 7</option>
       <option value=147>DropDown 8</option>
       <option value=148>DropDown 9</option>
</select>

b)    If a dropdown contains more than 20 values, SharePoint automatically generates this element using an <input … /> element. See below:

<input name=”lookup-name” title=”Client class=ms-lookuptypeintextbox” id=”lookup-id” style="DISPLAY: none" onkeydown="CoreInvoke('HandleKey')" onkeypress="CoreInvoke('HandleChar')" onchange="CoreInvoke('HandleChange')" onfocusout="CoreInvoke('HandleLoseFocus')" type=”text” value=”(None)” choices="(None)|0|LOOKUP 1|140|LOOKUP 2|141|LOOKUP 3|142|LOOKUP 4|143|LOOKUP 5|144|LOOKUP 6|145|LOOKUP 7|146|LOOKUP 8|147|LOOKUP 9|148|LOOKUP 10|149|LOOKUP 11|150|LOOKUP 12|151|LOOKUP 13|152|LOOKUP 14|153|LOOKUP 15|154|LOOKUP 16|155|LOOKUP 17|156|LOOKUP 18|157|LOOKUP 19|158|LOOKUP 20|159|LOOKUP 21|160|LOOKUP 22|161|LOOKUP 23|162|LOOKUP 24|163|LOOKUP 25|164" match="" optHid="SPClient_Hidden" opt="_Select">

However, for some elusive reason, this suddenly stopped working in our production environment - which, in turn, broke other functionality contingent upon this behavior.  There were no new changes made to the production environment since the time when it was last working and now.  Also, the behavior is still working perfectly in our development environment. 

We have even scoured line by line comparing production and dev to see if there is anything that is different that could be causing this but have found nothing.  The only differences were the IDs used which is as expected.  We’re thinking it must be something environmental as we haven’t been able to find anything within the code or even the size of the SharePoint sites that would explain the sudden change in default behavior.

Has anybody else run into this issue in the past?  I wasn't able to find any reference to this specific issue searching with google and in multiple forums.

Thanks.


When to use Managed Metadata service in Sharepoint 2013 and 2010

$
0
0

Hi Folks,

I have been working on sharepoint from quiet some time now. I have been using managed metadata service also.

What I have not been able to find out so far is when should I be using MMS.

What are the real advantages that I can draw out of it.

I have one application that has Managed Metadata installed and has various terms stores and terms. 

The Managed metadata service  created is utilized in search,

What I do not know is what is why are we using it at all. 

What is benefit of it.

Managed metadata service could also be used in navigation is what i know.

But what confused me is when is the best scenario to use it for navigation.

Why can we not use the navigation provider in the managed metadata service. 

There might be other uses also, but that is not clear to me.

Can any one tell me why and in which scenario to really use it.

I know how to configure the mms and how it works though the jargons around the managed metadata.

Regards

Webpart Title URL (Change and PopUp When Clicked)

$
0
0

I'm trying to take the hyperlink title of an ExcelWebpart (TitleURL), change it, and upon clicking, making the link open in a dialog OR at least another window without changing the window already open. I found an article that uses jquery,



www+.moresharepoint.net/2014/12/web-part-url-title.html

However, I can't get this to work. One thing is, my webpart resides on a Custom webpart page. Not sure if this makes a difference. I tried putting a Content Editor on the page, placing the code there, but nothing. I tried placing the code directly in the WebPart page (at the bottom):

</tr>



</table>

(I placed the JS code here)

</asp:Content>

Actual Webpart where I changed the title URL:

<WpNs0:ExcelWebRenderer runat="server" AllowRemove="True" ... TitleURL="pasted my page URL here" ... </WpNs0:ExcelWebRenderer>

BUT, nothing happens.

I tried placing a Content Editor on the page and calling the JS but nothing happens.


Export large SharePoint list using Power shell

$
0
0

Hi All,

I have a SharePoint workflow Tasks list which is having 100000 items in it.  How can I take the back up of the list with content?

The below three options working fine when the list size small.. but how to get the backup of the large list with content?

I tried the below three options.

Option 1: Tried to save the list as a template.. but it failed due to the list size.

Option 2: Using power shell... The below command given me the list skeleton. actual content in the list is missing


Export-SPWeb -Identity http://servername/sites/Test/ -Path C:\bakTasks.cmp -Itemurl  "/sites/Test/Lists/Tasks"                    -IncludeVersions All -CompressionSize 50

stsadm -o export -url "http://servername/sites/Test/Lists/Tasks" -filename  "C:\bakTasks.cmp" -includeusersecurity -versions 4 -cabsize 50 

Option 3: Using central administration UI..

In all the cases I am only getting the  list skeleton not the list data

I am not able to take back up of this list. can anyone help?



srinivas



How to find crawled properties name of a managed metadata column using powershell?

$
0
0

Hello

How to find crawled properties name of a managed metadata column using powershell? I want to get the crawled properties like ows_columnname.

Regards

Avi




Custom Master Page changes wont apply to few page layouts

$
0
0

Dear All

I'm having issue applying custom branding to SharePoint 2010 sites.. Branding works overall fine but it doesn't apply to few pages.

For example if I click on Enterprise and Metadata Keyword Settings in Document library the changes are not applied. I notice it's a page called metadatacolsettings.aspx in layouts and I see it references application.master.. Similarly I see couple of other pages out of sync and all of them have application.master as Master Page..

Any ideas why this could be happening.. Please let me know

Thanks

A New Year, a New Challenge! Become the FIRST SharePoint 2010 Guru of 2015!

$
0
0

Happy New Year!

"Guru 2014" is so 'last year'!

The real glory is to be the first Guru of 2015! :D

The birth of a new year, and a new hero?

Or the stamp of authority from long established Guru leaders?

The challenge is on, all eyes are watching, anyone could win this month.

The prize? Glory! Honor! Virtual medals! Unashamed love and worship from those within the community and those bloging about it (article spotlights, weekly awards). Published interviews and the chance to climb the TechNet social ladder. Become a true TNWiki Ninja and advance through to black belt... and beyond!

All you have to do is add an article to TechNet Wiki from your own specialist field. Something that fits into one of the categories listed on the submissions page. Copy in your own blog posts, a forum solution, a white paper, or just something you had to solve for your own day's work today.

Drop us some nifty knowledge, or superb snippets, and become MICROSOFT TECHNOLOGY GURU OF THE MONTH!

This is an official Microsoft TechNet recognition, where people such as yourselves can truly get noticed!

HOW TO WIN

1) Please copy over your Microsoft technical solutions and revelations toTechNet Wiki.

2) Add a link to it on THIS WIKI COMPETITION PAGE (so we know you've contributed)

3) Every month, we will highlight your contributions, and select a "Guru of the Month" in each technology.

If you win, we will sing your praises in blogs and forums, similar to the weekly contributor awards. Once "on our radar" and making your mark, you will probably be interviewed for your greatness, and maybe eventually even invited into other inner TechNet/MSDN circles!

Winning this award in your favoured technology will help us learn the active members in each community.

Feel free to ask any questions below.

More about TechNet Guru Awards

Thanks in advance!
Pete Laker


#PEJL
Got any nice code? If you invest time in coding an elegant, novel or impressive answer on MSDN forums, why not copy it over toTechNet Wiki, for future generations to benefit from! You'll never get archived again, and you could win weekly awards!

Have you got what it takes o become this month's TechNet Technical Guru? Join a long list of well known community big hitters, show your knowledge and prowess in your favoured technologies!


How To Save form Details into Document Library

$
0
0

Hi All,

I have created form as a visual webpart in SharePoint site, this list having details of the document library details, like name of the doc, location, Employee and uploaded document.

Now i want to save this details into custom document library, for this i have used the same way a list item updated.

but, i got the below error

" To add an item to a document library use SPFileCollection.Add()"

Any Help, How to do the same?

Thanks in Advance!

Print functionality programatically

$
0
0

Hi,

I have a requirement like i need to implement a print button.I used templates for printing the data.When i click on print template button, open the aspx file by passing request id of the form as query string.The values in the print template forms will capture the corresponding data by in the list and using request id as key value.Please share me the code sample.Thanks in advance.

Regards,

Praveen

Creating a visual web part as a sandbox solution

$
0
0

Hi

I am new to the SharePoint development. I was trying to create a visual web part asa a sandbox solution but it is not working as expected.

I am trying to get all the list titles in a dropdown and then onclick of a button I will display the selected list title in a text box.

This is the code snippet of the ascx file.

protected void Page_Load(object sender, EventArgs e)
        {

                  
                var sweb = SPContext.Current.Web;
                DropDownList1.DataSource = sweb.Lists;
                DropDownList1.DataTextField = "Title";

                DropDownList1.DataBind();
            
        }

        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
           
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            
           
                var sweb2 = SPContext.Current.Web;
                SPList listname = sweb2.Lists[DropDownList1.SelectedItem.ToString()];
                TextBox1.Text = listname.Title;
            
        }

Current Output:

It is populating all the lists in the dropdown but after clicking the button it always shows the first list name i.e "cache profile" in the text box.

Desired Output :

1) It will show the selected list title in text box after clicking the button not always the first list title in the drop-down list. 

2) After clicking the button it does not refresh the whole page to show the output in the text box.

Please assist.


Impossible to create a subsite

$
0
0

HI;

When I try to create via programming a subsite I have the following error into the logs ?

Critical Error loading and running event receiver CreateSubSiteClients.EventReceiver1.EventReceiver1 in CreateSubSiteClients, Version=1.0.0.0, Culture=neutral, PublicKeyToken=65c72d027ab597dd. Additional information is below.  Le processus de travail exécutant cette demande a été supprimé, car il dépassait la contrainte de ressource CPUExecutionTime

Any idea ?

Regards

Error because of override of owshiddenversion data

$
0
0
Hello all,

I am getting following error in ULS log while updating a PropertyBag value of a listitem in document library. It is being thrown from source -  sharepoint foundation. I am using SharePoint 2010.

Did any one here have experienced this error and know reasons for it?
Can this error fail the saving of property bag value for a list item?

Error
12/02/2014 12:38:08.50CustomProcess.exe (0x21B4)0x183CSharePoint FoundationGeneral8e2mHighError because of override of owshiddenversion data: list name = TestDocLib, item id = 2867

Please note, versioning is not enabled on document library.

Regards,
Indra

Thanking You,

i have date type list field in sharepoint list and i have created one form in sharepoint webpage.

$
0
0

Hi All,

i have date type list field in sharepoint list and i have created one form in sharepoint webpage.

Now i want to save that field from shareepoint webpage, its declared "t1.text" but its showing error.

How can i save this field?


How to convert below code using client object model

$
0
0

convert using client object model

Is there any field that can specify in filter to return custom libraries?

foreach (SPList list in oWeb.Lists)
            {
                    foreach (SPFolder oFolder in list.Folders)
                    {
                        if (oFolder != null)
                        {
                            foreach (SPFile file in oFolder.files)
                            {
                                if (CreateDirectoryStructure(tbDirectory.Text, file.Url))
                                {
                                    var filepath = System.IO.Path.Combine(tbDirectory.Text, file.Url);
                                    byte[] binFile = file.OpenBinary();
                                    System.IO.FileStream fstream = System.IO.File.Create(filepath);
                                    fstream.Write(binFile, 0, binFile.Length);
                                    fstream.Close();
                                }
                            }
                        }
                }



How to add Chart web part on Community site?

$
0
0

Hi

I am site admin of SharePoint Community site. I am unable to see business data web parts on my page. I searched for it and found the solution that I need to activate SharePoint Server Enterprise Site Collection features.

I activated this feature. But then also Business Data web part option is missing. I also found one solution to activate BizApps Site Template feature. I am not able to find this feature in my Site Features.

Is it possible to add Business Data web parts on community site? Please suggest me how this can be handled?

Pop window with webpart page using jquery in sharepoint

$
0
0

Hi All,

I am having a page with the custom webpart.

I want that page in an pop up window.

I don't want to use SP.UI.ModalDialog.

I want to use Jquery lightbox pop up is it possible.

Can any one please let me know.

Thank you,

Sowjanya. 

Why is by default present in web.config file ?

$
0
0

Hi all,

I am new to SharePoint world. I am using SessionState objects in my application. But because of the line

<remove name="Session" />

in the web.config file of the web application, this object is always null.

Please tell what is the reason for the presence of this line in SharePoint 2010, but not in SharePoint 2007.

Thanks in advance.


srnitk

SharePoint

$
0
0

Hi,

I have created an Entry Form in SharePoint.i want to upload some files and retrieve the same from Database using HTML with Javascript.

how to access visio drawing (.vdw - in SharePoint page) shapes in C#

$
0
0

Hi,

I need to get all shapes (which has links to other sharepoint pages) from visio drawing published in Visio web Access webpart. I could able to get Visio web Access webpart through code and get the diagram path.

1.how to get the drawing and shapes in it from webpart?  

2, Does it require to download the drawing locally to get all shapes in it? If so, shall use interop.visio?

3. Have seen some javascript vwa API to getShapes, etc. Is it available in C#?

4. Tried with interop.visio for the drawing which is stored on drive. It gives "exception occured" while open the .vdw file. (Documents.Open(@"C:\test.vdw"); How to do this? Please guide. Environment (VS2010, SP2010, Visio 2010). thx


Viewing all 11571 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>