Event recevier with another list

Can some one help how i can attached  ItemAdding event in the the other list with minimal changes in code.

Hi Reddyraj,
i need to add the another recevier in element.xml file so that the event will execute on that list
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   <Receivers ListTemplateId="100">
      <Receiver>
         <Name>CustomEventReceiversItemAdded</Name>
         <Type>ItemAdded</Type>
         <Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
         <Class>MyApp.CustomEventReceivers.CustomEventReceivers</Class>
         <SequenceNumber>10000</SequenceNumber>
      </Receiver>
      <Receiver>
         <Name>CustomEventReceiversItemAdding</Name>
         <Type>ItemAdding</Type>
         <Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
         <Class>MyApp.CustomEventReceivers.CustomEventReceivers</Class>
         <SequenceNumber>10000</SequenceNumber>
      </Receiver>
   </Receivers>
</Elements>
Check the link below..http://www.expertsupdates.com/sharepoint-articles/create-sharepoint-event-handlers-using-vishal-studio-66.aspxPlease mark the answer and vote me if you think that it will help you resolved the issue

Similar Messages

  • Not able to set databinding for dropdown with another list datasource

    Hi
    I have created one dataviewwebpart on the basis of list1.
    Now I want to add one dropdown in one of the column which will display the values of another list.
    So I added link datasource as list2 for another datasource.
    I want to display versionID's  from another list for the item present in the row to this dropdown and when user click on icon I will pass selected version ID and ItemID(available in the row). So the user will able to see the selected version of the
    seleted item in another list.
    But I am not able to select versionID form list2 in "Change databinding" for the dropdown.
    In select a datasource dropdown its not showing the linked datasource of List2.
    What can I do ?
    Is there any other solution ? Am I missing anything?

    Hi,
    I recommend to edit the dropdown control with the code below:
    <SharePoint:DVDropDownList runat="server" id="ff5{$Pos}" DataSourceID="FilteredLookup" DataTextField="Title" DataValueField="Title" SelectedValue="{@MathTeachers}" __designer:bind="{ddwrt:DataBind('u',concat('ff5',$Pos),'SelectedValue','SelectedIndexChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@MathTeachers')}"/>
    Please remember to change the id, DataSourceID, DataTextField, DataValueField and SelectedValue to the value in your page code.
    More reference:
    https://www.mriwm.com/Public/PamBlog/Lists/Posts/Post.aspx?ID=39
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Multiple event receivers with a list

    Hi All,
    If there are two item event receivers attached with a list and event is cancelled by event receiver that trigger first, will second event receiver be invoked? As per my understanding that second event receiver will not be invoked.
    I have a requirement where in case first event receiver cancel the event, second event recever should still be invoked.
    do anyone has any idea aroound it?
    Regards Amit

    Hi, Amit KM.
    http://msdn.microsoft.com/en-us/library/gg749858.aspx
    Notice the following details:
    Synchronous event receivers are called in sequential order based on the sequence number specified during event binding. This applies to both Before and After synchronous events.
    Asynchronous After event receiver threads are initiated in sequential order based on the sequence number. However, there is no guarantee that they will finish in that same order.
    An asynchronous After event can start at any time after its associated user action is performed. It may start before, at the same time as, or after the Web request is completed.
    After a user initiates an action in the SharePoint user interface, and before SharePoint Foundation executes the user action, the synchronous Before events are raised. If there are multiple synchronous Before events, they are raised in the order specified
    by their sequence number. Similarly, synchronous After events are raised after SharePoint Foundation executes the user action. These, too, are raised in the order specified by sequence number. As you can see, all synchronous events are processed in the same
    thread as that in which the user action occurs.
    Asynchronous After events, however, are processed on secondary threads.
    So you're completely right that if the first event receiver has cancelled the operation, the second event receiver will never been executed.
    In your case if you want second event receiver(B) to be invoked regardless of the first event receivers'
    (A) result you can easily swap the sequence numbers for those event receivers.
    Event Receiver Sequence          
    The event receiver sequence specifies the order in which an event receiver is executed in cases where an event triggers multiple event receivers. For example, if you have two
    ItemAdded event receivers bound to the same list (one from Assembly "1" and the other from Assembly "2"), the event receiver that is bound with a lower sequence number is executed first. A practical example is adding an event receiver to a
    system list that already has a system event receiver bound to it. In that case, you assign the new event receiver a higher sequence number.
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Receivers ListUrl="Lists/Tasks">
    <Receiver>
    <Assembly>MyReceiverAssembly, Version=1.0.0.0, Culture=Neutral,
    PublicKeyToken=12e5e5525fb3d28a</Assembly>
    <Class>MyReceiverAssembly.MyReceiverClass</Class>
    <Type>ItemAdded</Type>
    <Name>My ItemAdded Event Receiver</Name>
    <Synchronization>Synchronous</Synchronization>
    <SequenceNumber>1000</SequenceNumber>
    </Receiver>
    </Receivers>
    </Elements>
    LinkedIn Profile
    SharePoint Advanced Visibility Options project
    SharePoint Managed Metadata Claims Provider project

  • Disable event firing while updating list item in custom timer job

    Hi
    I am adding new items in the list usign custom timer job.
    While adding the items in the list event receiver of another list (which is not related to list which is updating) is getiing fired due to which I am getting data wrongly updated and exceptions are comming.
    why the another lists event recevier is executing while updating my list?
    How can I disable event firing from timer job code?
    please suggest any solution

    Hello,
    It seems you have deployed your event receiver globally and it is applied to all the lists. I can suggest two ways:
    1. Either you update your event receiver feature.xml file and attached to specific list, wherever you want. You can follow below link to attach event with specific list via code:
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceiverdefinition.aspx
    Or instead of code you can also pass ListUrl in feature.xml file:
    http://msdn.microsoft.com/en-us/library/ff398052.aspx
    2. OR delete event receiver from the list: You can use below code in your timer job to delete event receiver
    http://sarangasl.blogspot.in/2009/11/remove-event-receiver-in-sharepoint.html
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Search a List Using Another List in Excel 2010

    VLOOKUP is maxing out and refusing to complete my search request.  I am querying a list of 199,000 rows with another list of 48 rows.  Excel says it is too hard.  Is there another way to do this?  (The answer posted on this site by an
    earlier responder to a similar question was not helpful.  I do not want to use FIND to search name-by-name through the bigger list).
    Doug in York PA
    Douglas R. Eckert

    Firstly, would you please let us know what's your formula and source data looks like?If the VLOOKUP function indeed cant complete your search request,the VBA dictionary or sql  should be a good option for you.
    Using VBA dictionary way to lookup value:
    Sub Test()
    Dim ds
    Dim i&, irow1&, irow2&, j%, arr, arr1, arr2
    Dim s
    Application.ScreenUpdating = False
    Set ds = CreateObject("scripting.dictionary")
    irow1 = [A1048576].End(xlUp).Row
    arr = Range("A1:A" & irow1)
    irow2 = Sheets(1).[A1048576].End(xlUp).Row
    arr1 = Sheets(1).Range("A1:B" & irow2)
    arr2 = Sheets(1).Range("A1:B" & irow2)
    On Error Resume Next
    For i = 1 To irow2
    ds.Add arr1(i, 1), i
    Next
    Err.Clear
    On Error GoTo 0
    For i = 1 To irow1
    If arr(i, 1) <> "" Then
    s = ""
    s = ds(arr(i, 1))
    If s <> "" Then
    arr2(i, 1) = arr1(s, 2)
    End If
    If s = "" Then
    arr2(i, 1) = ""
    End If
    End If
    Next
    [B1].Resize(irow1, 1) = arr2
    Application.ScreenUpdating = True
    End Sub
    If you are not  familiar with VBA code or you just wanna another workaround,please fell free to let us know.

  • How Do i create a list that will show in a dropdown box with the list being pulled from another tab and not the cell data format junk?

    How Do i create a list that will show in a dropdown box with the list being pulled from another tab and not the cell data format junk?
    I currently run OS X 10.10.1
    Now i have been trying to work on this for a while now and what i want to do should be simple but its apparently not.
    Here is an example of what i want to happen.
    I will have 2 tabs: Contact | Sales
    Now Contacts will have the list of names and various information about a customer, While Sales will have one drop-down box for each Cell Row that will show the names of the person in tab contacts
    for what i am wanting to do i cant use the data format pop-up menu because the list is edited everyday several times a day.
    Now how do i do this, Excel can do this so how can numbers do it?

    Hi Shegra,
    Paste this into a applescript editor window and run it from there. In the script you may need to adjust the four properties to agree with your spreadsheet. Let me know if you have any questions.
    quinn
    Script starts:
    -- This script converts column A in one table into an alphabetized list of popups. It copies the last cell in that column. Then reverts the column to text. It then refreshes popups in column A of a data table starting with a user defined row.
    property DataEntrySheet : "Sheet 1" --name of sheet with popups to be refreshed
    property DataEntryTable : "Sales" --name of table with popups to be refreshed
    set copyRange to {}
    property PopValueSheet : "Sheet 1" --name of sheet with popup values table
    property PopValueTable : "Contacts" --name of table with popup values
    set PopStartRow to {}
    tell application "Numbers"
      set d to front document
      set ps to d's sheet PopValueSheet
      set pt to ps's table PopValueTable
      set s to d's sheet DataEntrySheet
      set t to s's table DataEntryTable
      set tf to t's filtered --this records filter setting on data Entry Table
      display dialog "Start from row #..." default answer "" with icon 1 -- with icon file "Path:to:my.icon.icns" --a Week # row
      set PopStartRow to {text returned of result}
      tell pt --convert list to alphabetized popups
      set ptRows to count rows
      set copyRange to ("A2:" & name of cell ptRows of column "A")
      set selection range to range copyRange
      set selection range's format to text
      sort by column 1 direction ascending
      set selection range's format to pop up menu
      -- popupsmade
      set selection range to cell ptRows of column 1 of pt
      set v to value of cell ptRows of pt
      end tell
      activate application "Numbers"
      tell application "System Events" to keystroke "c" using command down
      tell pt
      set selection range to range copyRange
      set selection range's format to text
      end tell
      tell t
      set filtered to false
      set tRows to count rows
      set pasteRange to ((name of cell PopStartRow of column "A") & ":" & (name of cell tRows of column "A"))
      set selection range to range pasteRange
      tell application "System Events" to keystroke "v" using command down
      set filtered to tf
      end tell
    end tell

  • When creating a new record in a list, I want to create a new record in another list, too, together with the ID of the first record

    OK, for anyone who has ever programmed a database, this one is easy. However, I am EXTREMELY limited. I work with SharePoint 365 (2013). I am pretty proficient in a number of programing languages, but I really don't know how to program SP. I wouldn't even
    know where to put code.
    Say, I have two lists: List A, with Items A1 (ID), A2, A3 and List B, with Items B1 (Lookup to A1), B2, B3. What I want this: When I create a new record in List A I want that also an empty record (except for the B:A1 item) is created. Is that possible without
    any major programing?

    you can create a workflow to achieve your requirement
    http://sharepoint.stackexchange.com/questions/50059/create-a-list-item-when-item-is-created-in-another-list
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • HT1386 I tried syncing my iPad to my computer but it says it's synced with another computer. This is not true and I verified in iTunes preferences that my ipad's name appears in the devises list. Can anyone help?

    I tried synI tried syncing my iPad to my computer but it says it's synced with another computer. This is not true and I verified in iTunes preferences that my ipad's name appears in the devises list. Can anyone help?cing

    See if this is what you are experiencing ad try the solution in this article if you are.
    http://itsmichaelw.com/tutorials/this-computer-has-been-previously-synced-with-a n-iphone-or-another-ios-device/

  • Company is merging with another company. How do I add other company's Bonjour/Messenger buddy list to our company's Bonjour/Messenger buddy list?

    So the company I work for is merging with another company. Our company already has an internal Bonjour/Messages set up so that we can all communicate to each other. The company that we're merging with has the same.
    How do I merge their Bonjour/Messenger Buddy List with our Bonjour/Messenger Buddy List so it's all in one list?
    Much thanks!!!

    Hi,
    It will depend how and where the other computers are.
    Broadly speaking any Mac computer on the same LAN using iChat or Messages with the Bonjour account enabled will see all the other Macs (The app reads the computer User's Contacts App (Address Book) My Card and broadcasts the name)
    This works up to the point you go beyond 255 computers or devices.
    The router will have one IP allowing for 255 devices to be connected.
    To state this another way.
    The Bonjour account in Messages or iChat is a self connecting, self populating Buddy list.
    Your Name is read from the Address Book on older systems or the Contacts app in Mountain Lion and above  at the one called the My Card and this is broadcast as your "Screen Name".
    You see the names in the Buddy list that correspond to other peoples My Card.
    On this iMac I am using I am "Ralph Johns"
    On my G4 tower I am "Ralph G4" and on my laptop I am "Ralph MacBook Pro"
    This means if I hook up the three using Bonjour I know which is which.
    (As an aside this also allows me to separate them out on AIM and Jabber lists as well as I have the My Card for this computer and Address Cards for each others)
    7:51 pm      Friday; February 14, 2014
      iMac 2.5Ghz 5i 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • How can I share contact list with another MAC

    How can I share my contact list with another MAC?

    Hi,
    There does seem to be a presumption in the other reply that your girlfriend is living with you.
    A File transfer via Bonjour would then work.
    Also the File Sharing in System Preferences > Sharing would cause her computer to show up on your Finder's side bar as a Share.
    With iChat if you both have AIM Login names you could still do File Transfers.
    (It is slightly more complicated if you have Jabber ID logged in alothough not impossible).
    9:54 PM      Sunday; January 15, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Lion 10.7.2)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Why almost songs listed with another same song on the music category of 'on this iphone'??

    I buy songs in iTunes Store.
    There is no song I want sometimes. then I saw 'on this iphone' category for putting some music in.
    Why are almost songs I bought listed with another copy on the list??? some songs are, but some are not.
    morever, what does the sign 'O' in front of song name mean??

    of course I use recent version of iTunes.
    It's not the problem.

  • Workflow to send email with link to another list

    First it should not matter that I want to link to another list.    In the e-mail, I put the link of the list like this:
    <a href=http://mysite/mylist/EditForm.aspx?ID=[%Current Item:ID%]>Click Here</a>
    Of course, the names have changed to protect me... :-)
    What I am getting is:
    <a href=http://mysite/mylist/EditForm.aspx?ID=<http://mysite/mylist/EditForm.aspx?ID=9>Click Here</a>
    So, instead of just the current ID number, I am getting the complete link.
    How can I fix that?
    Is there any way to get to a list item by the title instead of the ID?
    Thanks!
    David L. Crooks

    Hi David,
    In the email you do not need <a> tags. You can just use the hyperlink action to add the link to the text. See screen shot below.
    Hope this helps.
    Regards, Kapil ***Please mark answer as Helpful or Answered after consideration***

  • Event Receiver:Item is Being Adding Event Recevier Issue

    Hi All,
     * I had written Simple event receviers(Item is Being Adding) to a site at FarmLevel(Farm Solution) and below is the code for it.
    * In below code I am adding the List name to a Column called "Name" ,when Item is being adding the code is getting loop and inserting unwanted data and updating Column "Name" with it instead of updating when item is added
    *Below if u see there is no value in Column "Name" when I insert values "Mark Devis"(Title) and "In Meeting"(Body) columns
    Can any one help me how can I solve the issue
           Code:
    string listitle = properties.List.Title + "" + "is List Name";
    string siteurl = http://sp2010:8080/personal/Sample/;
    using (SPSite mysite = new SPSite(siteurl))
    using (SPWeb myweb = mysite.OpenWeb())
    SPList mylist = myweb.Lists["Announcements"];    
    SPListItem newitem = mylist.Items.Add();
          newitem["Name"] = listitle.ToString();
          newitem.Update();
    Result:
    Samar

    Hello Samar,
    Try to use before/after properties to update item in list on ItemAdding event.
    http://sarveshspn.blogspot.in/2010/05/using-itemadding-and-afterproperties-to_08.html
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/1ed217b1-9441-4fe1-b3aa-68b2768bdfc7/updating-list-item-value-on-the-itemadding-event-handler-of-an-item-receiver-class?forum=sharepointdevelopmentlegacy
    Also make sure that you have at least contributor right in list to edit data.
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • My itunes erroneously says that my ipod is synced with another computer when I try to sync. What can I do to fix this?

    First, right after updating my iTunes to the latest version, my iTunes will not display album covers. It says exactly "iTunes is unable to browse album covers on this computer." It has never been an issue before, but, anyway... that is where it all started.
    Then I read a bunch of Apple Support topics on the subject, and it directed me to replace my library file with a previous library file. So, I did, and now, not only will my albums not display, but my iPod Touch will not sync with my computer, the only computer I have ever used it on. It says that the ipod is synced with another library and asks me if I want to erase and sync (I have my music on my computer, but I will lose all of my apps and such).
    What can I do to resolve this? Thanks for the help.

    Syncing to a new iTunes library or computer will erase your ipod. Only if you back up your iPod manually before syncing, you can restore your device from that backup again. A manual backup does not include the sync process.
    Do this:
    Disable autosync in iTunes, connect your iPod to your new computer and right click on it in the device list and choose backup. iTunes will backup your iPod without syncing.
    Transfer your purchases the same way, choosing "transfer purchases" this time.
    All media content will be erased during the first sync, but you can restore your settings and app data from your manual backup afterwards.
    Don't forget to set up at least one contact and event on your new computer to be able to merge calendars and contacts when you sync the ipod for the first time.
    Music is one way only, from the computer to your device, unless you bought the songs in itunes and transferred your purchases.
    There is 3rd party software out there, but not supported by Apple, see this thread:http://discussions.apple.com/thread.jspa?threadID=2013615&tstart=0

  • My itunes says that my ipod is synced with another library when it is not and cannot update or sync without wiping it and all its data

    My itunes says that my ipod is synced with another library when it is not and cannot update or sync without wiping it and all its data
    Can anyone help me

    Syncing to a new iTunes library or computer will erase your ipod. Only if you back up your iPod manually before syncing, you can restore your device from that backup again. A manual backup does not include the sync process.
    Do this:
    Disable autosync in iTunes, connect your iPod to your new computer and right click on it in the device list and choose backup. iTunes will backup your iPod without syncing.
    Transfer your purchases the same way, choosing "transfer purchases" this time.
    All media content will be erased during the first sync, but you can restore your settings and app data from your manual backup afterwards.
    Don't forget to set up at least one contact and event on your new computer to be able to merge calendars and contacts when you sync the ipod for the first time.
    Music is one way only, from the computer to your device, unless you bought the songs in itunes and transferred your purchases.
    There is 3rd party software out there, but not supported by Apple, see this thread:http://discussions.apple.com/thread.jspa?threadID=2013615&tstart=0

Maybe you are looking for

  • How to sync photo albums in between iPhone and ipad on upgrading to ios8?

    hi, i upgraded to ios 8 on my iPhone and iPad which both have a common Apple ID. after up gradation only camera roll got synced from iPhone to iPad.Photo albums which were earlier present in iPad got deleted. how do I get them back or is there a way

  • Business printers and devices have driver problem

    My biggest problem after installation of 10.5 is that I use my laptop in a prepress business and I lost nearly all of my print drivers. I did a rights repair and still no luck. I'm guessing that none of the high end business copier printers we have i

  • Creating layers

    Despite doing everything correctly ( but clearly doing something wrong) I have been unable to create a layer on a page. The layer border is in a thin black line, not a thick blue one, and there is no layer icon at top left of layer shape. when I rele

  • Power Manager 2.30 Won't Install on Vista on R60

    I have used System Update which tells me Power Manager is availa ble for install.  I install and its says it is successful and asks me to reboot. I reboot, but still now Power Manager.  If I rerun System Update, I again get told that Power Manager is

  • SAP PS capex and R&D

    Experts, I am working SAP PS FLC.My customer currently has Capital And R&D projects so here are the recommendations I made : 1.Two different coding masks 2. specific number ranges to differentiate capital and R&D 3.General cost planning & detailed pl