Click here to Skip to main content
14,336,280 members

SharePoint

 
AnswerRe: Email search functionality with Subject and Body using C#.net & Sharepoint 2010 Pin
Richard MacCutchan10-Jul-13 1:43
protectorRichard MacCutchan10-Jul-13 1:43 
QuestionRe: Email search functionality with Subject and Body using C#.net & Sharepoint 2010 Pin
Sreedharchintha11-Jul-13 0:41
memberSreedharchintha11-Jul-13 0:41 
AnswerRe: Email search functionality with Subject and Body using C#.net & Sharepoint 2010 Pin
Ingo11-Jul-13 1:48
memberIngo11-Jul-13 1:48 
QuestionPrimavera6 and sharepoint integration Pin
hardikar.swaroop4-Jul-13 23:15
memberhardikar.swaroop4-Jul-13 23:15 
AnswerRe: Primavera6 and sharepoint integration Pin
Ingo4-Jul-13 23:46
memberIngo4-Jul-13 23:46 
QuestionQuickLaunch not rendering the menu Pin
nainakarri4-Jul-13 7:52
membernainakarri4-Jul-13 7:52 
AnswerRe: QuickLaunch not rendering the menu Pin
Ingo4-Jul-13 23:41
memberIngo4-Jul-13 23:41 
QuestionMultiple versions of a document added on each update Pin
Aptiva Dave3-Jul-13 7:49
memberAptiva Dave3-Jul-13 7:49 
I have a project that has a piece that uploads documents to a library in which versioning is turned on. Everytime I add a new document or update a document I get two versions per update call. Here is my code:
'create the spfile item
           Dim twoXtwoFile As SPFile = twoXtwo.RootFolder.Files.Add(fileName, fileBytes, True)
           Dim twoXtwoItem As SPListItem = twoXtwoFile.Item
           twoXtwoItem(twoXtwos.Year) = year
           twoXtwoItem("Title") = fileName
           twoXtwoItem(twoXtwos.Executive) = New SPFieldLookupValue(CInt(Request.QueryString("ID")), execItem(Execs.LookupName).ToString)

           Try
               twoXtwoItem.Update()
           Catch ex As Exception
               'display an error message
               errorMessage.InnerText = "Sorry, but this file could not be added.  Please try again or contact the IT Department Help Desk."
           Finally
               web.Dispose()
           End Try


The code runs fine, but when I go look at the version history of the document you can see where you have two versions that are the exact same. You really notice on the first upload where you have version 1.0, which is the file itself, and then version 2 that has the same file and the list column items added to it. All subsequent updates just contain two versions of the same update.

The only thing I can think of here is that my code is updating the file first and then going back and adding the list values to the object. Am I right to think that and what can I do so that I only have one version per update/add?

modified 3-Jul-13 14:08pm.

AnswerRe: Multiple versions of a document added on each update Pin
Ingo3-Jul-13 23:50
memberIngo3-Jul-13 23:50 
QuestionPrint Document in SharePoint using Javascript Pin
Laurence12342-Jul-13 9:51
memberLaurence12342-Jul-13 9:51 
AnswerRe: Print Document in SharePoint using Javascript Pin
Ingo3-Jul-13 1:23
memberIngo3-Jul-13 1:23 
GeneralRe: Print Document in SharePoint using Javascript Pin
Laurence12343-Jul-13 2:14
memberLaurence12343-Jul-13 2:14 
AnswerRe: Print Document in SharePoint using Javascript Pin
Ingo3-Jul-13 4:39
memberIngo3-Jul-13 4:39 
QuestionSharepoint pagelayout unable to access SPWebpartmanager from master page Pin
nainakarri1-Jul-13 0:31
membernainakarri1-Jul-13 0:31 
AnswerRe: Sharepoint pagelayout unable to access SPWebpartmanager from master page Pin
Ingo1-Jul-13 21:48
memberIngo1-Jul-13 21:48 
GeneralRe: Sharepoint pagelayout unable to access SPWebpartmanager from master page Pin
nainakarri4-Jul-13 7:47
membernainakarri4-Jul-13 7:47 
QuestionFiltering data in the gantt view of a list Pin
Manohar P17-Jun-13 23:43
memberManohar P17-Jun-13 23:43 
AnswerRe: Filtering data in the gantt view of a list Pin
Ingo23-Jun-13 21:19
memberIngo23-Jun-13 21:19 
QuestionHow to combine or cross join a custom list and document libray using the spsitedata query in sharepoint 2010 Pin
kkamalakannanmca11-Jun-13 18:22
professionalkkamalakannanmca11-Jun-13 18:22 
AnswerRe: How to combine or cross join a custom list and document libray using the spsitedata query in sharepoint 2010 Pin
Ingo23-Jun-13 21:21
memberIngo23-Jun-13 21:21 
Questionis there any emulator where I can visualize my infopath form as mobile view. Pin
Member 79465377-Jun-13 3:43
memberMember 79465377-Jun-13 3:43 
AnswerRe: is there any emulator where I can visualize my infopath form as mobile view. Pin
Ingo23-Jun-13 21:08
memberIngo23-Jun-13 21:08 
Questionhow can i open the infopath form in mobile , sharepoint 2010 Pin
Member 79465377-Jun-13 1:29
memberMember 79465377-Jun-13 1:29 
QuestionCan any body provide me the exact advantage of client object model with useful links? Pin
rajeshvsnk5-Jun-13 20:55
memberrajeshvsnk5-Jun-13 20:55 
AnswerRe: Can any body provide me the exact advantage of client object model with useful links? Pin
Ingo23-Jun-13 21:24
memberIngo23-Jun-13 21:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.