New answers tagged event-receivers
0
This sounds a lot like a parallel approval workflow. The parallel aspect can get a bit tricky. My recommendation would be to set it up with a replicator so that the approvals run one after the other first and then, once you're confident that works, implement parallel tasks. Here's a guide to creating a workflow with a custom task field:
...
0
I was struggling with the exact same issue. I was just going to give it up, when I thought I'd give two other event receivers a try: ItemFileMoving and ItemFileMoved. And it worked!
There is a logic to it I think, renaming and moving operations are somewhat alike.
You can see it best when you're creating a new folder from Explorer/WebDAV.
Immediately it ...
0
I think the key sentence is:
You can include custom information in content type definitions by adding special XML nodes
meaning that there is a possibility to add your own nodes in addition to the "SharePoint standard ones"
Here is another snippet:
SharePoint Foundation itself includes pre-defined XML documents you can use to specify custom forms ...
0
Based on the code you have used, try using the below code inside receivers tag.
Receivers ListTemplateId="101" instead of this use the following
Receivers ListUrl = "Lists/YourListName"
This will fire the event once item is added or updated.
Thanks.
0
Check the intername of the column you are trying to get the data from. if you have changed the name of the column after creating the list, then try with the old name.
Use 'Title' if you have changed it.
0
public override void ItemUpdating(SPItemEventProperties properties)
{
SPSecurity.RunWithElevatedPrivileges(delegate()
{
if ((properties.ListTitle == "Fahrzeuge") || (properties.ListTitle == "Räume"))
{
string currentTitle = properties.ListItem["Title"].ToString();
string newTitle = ...
1
You want the ItemUpdated event on the SPItemEventReceiver which occur after the ListItem (ie content) has been updated.
The FieldUpdated on the SPListEventReceiver happens after someone made a change to the field like made it required not when the content changes
0
If you some way to identify the item in the calendar (if the project title is unique, or you have some other primary key) then:
you can create a hidden field called 'EventCreated' or something
then inside your workflow have a condition that checks if an event is created
if it was then run an update list item query on your unique value
(see: ...
1
You need to add a column to the first calendar that stores a unique key of any related item in the team calendar. You could use the SharePoint ID of the first calendar, for example. Add a column to the Team calendar called "ParentID". Let the workflow find an item with that ParentID = current Item ID in the Team calendar. If that item is found, the workflow ...
0
Try that code in your event receiver:
class CustomEventHandler : SPItemEventReceiver
{
private HttpContext currentContext;
public CustomEventHandler() : base()
{
if (HttpContext.Current != null)
{
currentContext = HttpContext.Current;
}
}
public override void ItemAdded(SPItemEventProperties ...
0
You can do it only when the form, which initiates an event, is being rendered in CSRRenderMode.ServerRender mode. You also have to use Response.Redirect. You can check details in the following blog post: http://blog.sharepointalist.com/2013/03/sharepoint-2013-event-receiver-redirect.html
1
Doing anything even moderately intensive in sandbox code (like creating a subsite) is asking for trouble, sooner or later. You may find that creating a fake list item and broken site will become a "deployment step" in this scenario.
If your environment is on 2013, I'd like to suggest an alternate approach: Create an auto-hosted App with a web service that ...
1
Creating a site is a long running operation and therefore its a bad practice to do it an ItemAdding event which is synchronous by default. Make it on the ItemAdded Event and then it will be created, but no visual feedback will be given to the user.
Normally for this, we create a custom action on the list item, that custom actions open a simple aspx page ...
0
Rule #1: never change an out of the box SharePoint element.
Instead create a copy and change that. In this case, create a new content custom content type based on events and modify the custom content type.
You don't provide enough information to give concrete advice, but you can use the browser interface to move the content types out of the _Hidden back ...
Top 50 recent answers are included
