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.

Wednesday, December 15, 2010

Task Item Id In Workflows

Some may want to send the task link in email to their approvers. At that time, either we may need to use OnTaskCreated activity. this activity may fire sometimes, may not @ some moment throwing event delivery failure exception.

So how to get the task item id?
Answer is very simple! Just open workflow designer; there click on Create Task Activity, open properties. You can see one thing called TaskItemId with value -1. Assign a new field.
Now check the value of that field after create task activity. You will be getting the value of task item.

But one bad thing is, you can't obtain the reference to it. It simply gives taskitemid but if you try to obtain the item instance, it will throw an exception. According to my guess, it gives item id then creates item!!!

Thursday, July 1, 2010

Could not find ExportSettings.xml

This familiar error occurs during the site import. While exporting you wont even see any signs of failure but you may be wondering why during the import it fails...

This is due to various reasons such as space constraint, no.of cab files generated, size of cab files...

A simple way to fix this one is: go to the export file location. Open the last and 2 cab files and you will see some xml files. Copy all the xml files.

Keep it in a temp location.

Open the windows temp folder by typing %temp% in start -> run

Run the import command.

if a new folder with guid created under windows temp folder
pause the import by pressing break button

copy all those xml files into that location

continue the import.

Import runs fine...

Tuesday, June 15, 2010

Invalid WorkflowInstanceID parameter in URL

This error might be encountered for the item(s) whose workflow completed and initiated long back.
This is because of AutoCleanupDays property of Workflow. By default, the value is set to 60 days. After 60 days, if the workflow status is complete and initiated 60 days before, this workflow instance will be deleted.

This kind of deletion is for site performance purposes. To delete all theses old workflow instances, SharePoint runs a timer job named "Workflow Auto cleanup". If you wanted to keep all those workflow instances, you can go to Central Admin -> Operations -> Timer Job definitions -> Disable Workflow Auto Cleanup task.

Tuesday, June 8, 2010

There are no more files. (Exception from HRESULT: 0x80070012)

Sometimes we may need to backup and restore the site collection across servers...
After restoring in new server/site collection, some sites might be throwing the error "There are no more files. (Exception from HRESULT: 0x80070012)". This is because of the default.aspx page got customized in the source[ie. Backup site]. In the destination site, those changes are not procured.

To counter this error, open it in SharePoint Designer and right click on the default.aspx [the respective file] and click reset to site definition.

Site will be working like charm!!!

Monday, May 24, 2010

InfoPath Catastrophic failure Error

Sometimes we may need to design a new information panel for document content types. The preferred one is InfoPath form. So you will be going to Ste Actioins -> Content types -> Your Content type -> Document Information Panel Settings -> Design your template...

While doing this so, you may be facing an ugly error Catastrophic failure error. Dont worry about this error... this is because of the columns in your content type. While creating a column in content type, that column should not contain any space(s). For example, you created a content type named "Test Document" and the site column you use is "Test Column". Then this content type will face the catastrophic failure error.

Hence, while defining a site column, make sure that the column name is not having spaces. You may be wondering creating the site column through SharePoint GUI and adding that column to that content type, opening it in infopath form will work fine...

The reason is, space will be replaced with _x050_....

Hope this helps...