?
Solved

Problem with itemupdating event with documnet library in sahrepoint

Posted on 2010-08-30
2
Medium Priority
?
1,139 Views
Last Modified: 2012-05-10
Hii All Experts,
 First of all question tiltle is complecated to understand but i will try to explain my quetion properly.
I have sharepoint 2010. And i have one document library with item adding, item added item updating, item updated event. When i upload any document item adding and item added event call and code execute. after uploading when i update metadata(Custom columnss) , item updating , item updated event call. it works fine i wrote some code to generate Docnumber based on custom column.

Now when i open another documnet library and when i open document in word 2007 and when i click save as document to Another document library, item adding and item added event call, and then i can get documnet panel so when update some metada , again item adding and item added event call but not item updating event call. so i dont get docnumber.

I tried a lot for debug but no luck with execute item updating event. i dont know what to do?

So when user upload documnet than it works but when they save as documnet prolem with item updating event...

Hope you understand my question..

Thank you in advance
0
Comment
Question by:guessdip
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
rseabird earned 2000 total points
ID: 33566512
I have used item events also (only in MOSS), but I used the ItemUpdated and ItemAdded events.
Imho, those are better. You can do something like the piece of code below.
In this case, you edit the metadata after added or update, wiithout firing events and also without changing modified by and date.

DisableEventFiring();
try
{
   //do something with item (is a SPItem)
   item["column"] = ...;
   item.SystemUpdate(false);
}
finally
{
   EnableEventFiring();
}

Open in new window

0
 

Author Comment

by:guessdip
ID: 33569202
Hi,
 i have item added and alos item updated event. but all event works when we upload documnet. but when we use Save as method then only item added and item adding event works.
I will follow your code..
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question