.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan
Post New Web Links

How to delete "Attachment" Field with GUID "o"

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :C#
 

Hi

We have custom List which is gets created at the time of site provisioning, we have attached custom content type to the list.

In production, users for few site collection complained about not being able to edit list item. We enabled callStack in web.config, and tried to list item we saw following error

Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).   at System.Guid..ctor(String g)
   at Microsoft.SharePoint.SPFieldCollection.get_IdDict()
   at Microsoft.SharePoint.SPFieldCollection.GetFieldById(Guid fieldId, Boolean bThrowException)
   at Microsoft.SharePoint.SPFieldCollection.get_Item(Guid id)
   at Microsoft.SharePoint.SPListItem.get_Item(Guid fieldId)
   at Microsoft.SharePoint.Workflow.WorkflowTaskUpdateMailUtil.FIsWorkflowTask(SPListItem item)
   at Microsoft.SharePoint.SPListItem.PrepareItemForUpdate(Guid newGuidOnAdd, SPWeb web, Boolean bMigration, Boolean& bAdd, Boolean& bPublish, Object& objAttachmentNames, Object& objAttachmentContents, Int32& parentFolderId)
   at Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Bool


View Complete Post


More Related Resource Links

Get attachment data to a Field in the ListItem

  
Hi All, I have a list with Attachments,Title and Description fields in the List. And i have a requirement that when an attachment is added to the List(while adding a new item), the attachment data sholud be entered into the Description Column and save the item into the List. Can i do this functionality without using custom webpart..... Please suggest me the ideas.....  

attachment disappears when evaluating the required field in sharepoint list

  
hi all, i have a sharepoint list with soem required fields . when i do the attachement and say ok without entering the required fields in the page . the page refreshes and prompts me to enter the required fields. but the attachemnt disappears. i need to re attach the files aggain.. wats the fix for this ?jayaraja

Field type Choice is not installed properly. Go to the list settings page to delete this field.

  
Has anyone received this error message and know how to deal with it? Field type  Choice  is not installed properly. Go to the list settings page to delete this field. I have received this error three times now, once when trying to add a 'List Definition From Content Type' in Visual Studio twice when trying to add from existing site columns in Sharepoint in the list settings and library settings from the ribbon from a list and a document library.

delete using boung field value inside grid view

  
I want to delete data using boung field value inside grid view, I am doing this...but it is not finding bound field value<asp:BoundField DataField="nsid" HeaderText="nsid" SortExpression="nsid" Visible="false" />protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)    {        string sid = GridView1.DataKeys[e.RowIndex]["nsid"].ToString();        SqlCommand cmdx = new SqlCommand("delete from blogreply where sid='"+sid+"'",con);        con.Open();        cmdx.ExecuteNonQuery();        con.Close();please anyone tell me how to find bound field value..

Display Images from a Custom List's Attachment Field

  
i need to show each item on the list with image that was uploaded to its attachments field. the idea is that this list is a news list and will be show as a grid with the news and their corresponding attached image. i tried to add a custom column of type Picture, but it only allows to have a hyperlink added. i need the ability to upload the image on a new item creation form.   if there is a way to display it that would be great, if not please recommend a way to accomblish what i have explained.     thanks  

adding sharepoint attachment field to customlist

  

I added the  sharepoint attachment field.

 <SharePoint:AttachmentsField runat="server" ID="sp1" ControlMode="New" FieldName="Attachments"></SharePoint:AttachmentsField>       

But i could not see the control either on my pages.

I tried to put some validation on my customlist using ASP.NET requiredFieldValidatoon.

While changing the the Format as TextBox on Sharepoint Formfield,its turn to be nothing instead of showing the generic text box.

Also my Sharepoint field name id i used to get like "ff2{Pos}" on my SPDesigner 2007.I can't attach this id to ASP.NET required field validator.

Any idea ?

 

 

 


Think More..Do More..

How to delete the default columns( All day Event field ) from the Calendar List in sharepoint?

  

Hi,

Is there anyway of disabling the All day Event field in a Calendar list. I don't have the option to hide it either.

Any help appriciated...

Thanks

Srikanth Reddy


where is attachment field in WSS_Content Database in sql?

  

Hi,

I have a attachment field in my list in sharepoint 2007 & i want to access this field in Visual studio,but I dont know where  this field is store in sql & how i can achieve this feild?

Im appriciated if anyone help me.


how to start counting from 1 in automatic int increase field after delete table - sqlCE

  
hi
how to start counting from 1 in automatic int increase field after delete table ?
i have MEN table with 10 rows, if i delete the table (delete from MEN)
and if i insert new row - it start in 11.
how to start from 1  ?
thanks in advance
i work on sqlCE

how to start counting from 1 in automatic int increase field after delete table - sqlCE

  
hi
how to start counting from 1 in automatic int increase field after delete table ?
i have MEN table with 10 rows, if i delete the table (delete from MEN)
and if i insert new row - it start in 11.
how to start from 1  ?
thanks in advance
i work on sqlCE

Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

  
In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.

SqlCommand.ExecuteNonQuery() returns -1 when doing Insert / Update / Delete

  
Sometimes you end up with a return value of -1 when using the SqlClient.SqlCommand.ExecuteNonQuery method.

Why is that?



Well, the ExecuteNonQuery method is there for statements for changing data, ie. DELETE / UPDATE /INSERT, and the returned value are the number of rows affected by that statement.

When checking the documentation we can see that there are some conditions that return -1.



For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command.

When a trigger exists on a table being inserted or updated, the return value includes the number of rows affected by both the insert or update operation and the number of

rows affected by the trigger or triggers. For all other types of statements, the return value is -1. If a rollback occurs, the return value is also -1.

calculation, field and map traverse adjustment, and coordinate transformation

  
Free Pocket PC land surveying software -- COGO calculation, field and map traverse adjustment, and coordinate transformation -- for students and professionals.

Dropdown Event (Template Field)

  

Hi,

I have grid view control that includes a dropdown control in a template field.

I wish to execute some code when the value is changed in the dropdown list.  Can't figure out how to capture this event though?

Any suggestions?


How to take value of bound field of grid in a variable or in a textbox.

  

How to take value of bound field of grid in a variable or in a textbox.

 I m using this code in .aspx page for grid.

<asp:GridView ID="Grd_Mprocess" runat="server" AutoGenerateColumns="False"

                      Width="100%" AllowPaging="True"

                      onpageindexchanging="Grd_Mprocess_PageIndexChanging"

                      AllowSorting="True" PageSize="5"  >

                 <RowStyle CssClass="odd" />

                    <Columns> 

<asp:BoundField HeaderText="DOC_TYPE_PK" DataField="DOC_TYPE_PK"  Visible="true" >

</asp:BoundField>

  <asp:TemplateField HeaderText="DOC TYPE ID" Visible="true">  &nbs

Error: Encountered multiple versions of the same assembly with GUID...try pre-importing...TlbImp

  

Hi!  Can someone tell me how I can troubleshoot the following error: "Encountered multiple versions of the same assembly with GUID...try pre-importing one of these assemblies".

The website developed in VS 2010 (.Net 3.5). This error is only received on my workstation.  Another person developing the site does not experience this issue at all.  Also, not sure if this matters, but on my workstation the 'Assembly Information...' dialog contains no values even though the 'AssemblyInfo.vb' file does specify values for the title, desc, etc.  The GUID being referenced in the error is the main project of the three projects within the solution.

I tried looking through the GAC, but do not see any references to the projects or DLLs in the VS solution and am not sure what else/where to look.

If I delete the copy of the solution on my local machine and pull down a copy from source control (AnkhSVN) the solution will build with no error.  Once I make any changes, such as adding a new aspx file, then the error is received.

I can provide any additional information needed.


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend