Pergunta

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).

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top