1

I am working on creating a event reciever on a custom list .. my senario: I have a customizes newform.aspx and this form has a field called ticketID as hidden ..in the newform..so when a user creates a new item this Ticketid is created (i m thinking abt using event reciever for this) .. and when ever the user goes and edits the form..he can see this ticketid in that form..

ticket id gen..we have 3 locations dallas,kansas,london..so if the first user comes from dallas..the id for him will be inctick1d..and after if the 2nd person comes in and creates new item from kansas his id will be inctick1k..now again if the user from dallas comes in and create an new item his id will be inctick2d--this logic i m planning to write in event reciever under item added event

but it seems like if i use an item added event ..the ticket gen logic will fire when the first time the new item is created(which is what i want) but also for the item any other empty field value which was previously empty becomes assigned(which i dont want).

1 Answer 1

1

ItemAdded event fires only when Item is added first time, not when you revisit the item and update it.

If your id is fixed (i mean inctick1d for all persons from Dallas), and just depends on location and location is a drop down (not a lookup), you can also consider using calculated column.

1
  • there is another list which has list of the name and locations for example -->david-dallas,ravi-london...so i so i am trying to use item adding event..and in this senario i wud have to also need to know what name in the newform.aspx was selected from the dropdownbox(formfield) but in the item adding event in the event reciver i am not able to get the value selected in the dropdown box(based on this value i will be generating the id called tick1d,tick2d,tick1a..etc) of the newform.aspx?..any suggestions?
    – SandeshR
    Jan 16, 2012 at 22:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.