Monday, August 22, 2011

Failed to instantiate file from module The specified list does not exist.

Hi
In case anyone else has this problem try to change

Type="GhostableInLibrary" to

Type="Ghostable"

worked for me


Here I am trying to deploy master page my elements.xml file is like below after modification










Thanks to the author @

http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/27ac36ca-3d3a-47eb-9fc6-ee1b1846b8a3/


http://vspug.com/george/2008/02/05/failed-to-instantiate-file-quot-file-ext-quot-from-module-quot-modules-quot-the-specified-list-does-not-exist/

sharepoint 2010 Datetime field default value + add days

You can set datetime default field value not only Today, but you can have your own calculated value.

select any datetime field--->for default value select "Calcualted Value"

then you can give =TODAY()+ 10


for one year---->its =TODAY()+365

Thursday, August 18, 2011

sharepoint 2010 + item event receivers + session

I've been googling for last couple of hours for the correct post.

"How to use sessions in sharepoint item event handlers"

finally I could find the correct link(see below). Thanks to the author.

In a nut shull, it is available in synchronous events (adding, updating).
Not available in Async events (Added, Updated).

define a variable in receiver class, assign the HttpContext.Current in default constructor.


HttpContext hContext = null;

public MyCustomEventHandler() : base()
{
hContext = HttpContext.Current;
}


public override void ItemAdding(SPItemEventProperties properties)
{
hContext.Response.Redirect(“http://microsoft.com”)
}



http://blogs.msdn.com/b/sowmyancs/archive/2008/03/25/can-we-get-the-httpcontext-in-custom-event-handlers-in-sharepoint.aspx