Monday, September 19, 2011

When item context menu clicks throws error - "The item no longer available"

After adding webparts programmatically, users might be facing an error - "The item no longer available. This item may be deleted by another user" This is very common issue. When adding a webpart to a pgae it is common to forget,
                               webpartmanager.SaveChanges(webpart)

this line of code. Include this code after adding webpart, things will be working fine...

Wednesday, January 5, 2011

User cannot be found. at Microsoft.SharePoint.SPUserCollection.get_Item(String loginName)

This error may occur during the task form submit. There are 2 major reasons for the cause of this error.
Reason 1:
ITEMMETADATA property name. If you send a extended property name "AUTHOR" to your workflow form. Then during the task form submit, it will throw an error.

So what is the workaround?
Very simple, just change the ItemMetaData property of Author to some other value. In the workflow also change the author key to the property mentioned in the ItemMetaData.

Reason 2:
The field name/control name in the task form is "AUTHOR".

Workaround:
Change control/field name to some other value.