I have been stuck with the same problem and dint understand the problem for long enough....
I realized to check in as a major version and the problem solved....
Thanks a lot..
Wednesday, February 29, 2012
Monday, February 6, 2012
SSL Connection error in chrome 107
Go to option -> proxy settings and the standard MSIE window will pop up. Then go to advanced tab and be sure to tick:
USE SSL 2.0
USE SSL 3.0
USE TSL 1.0
Then click OK, close Chrome, open it again and it shall work.
USE SSL 2.0
USE SSL 3.0
USE TSL 1.0
Then click OK, close Chrome, open it again and it shall work.
Monday, January 30, 2012
The settings for this list have been recently changed. Refresh your browser sharepoint 2010
while the FormMode is in Edit mode you cannot call on the Update method for the list. The code works fine in display mode on the DispForm.aspx page and it will hide and show the correct fields in the EditForm.aspx page but when you click Save that is when the error is thrown. If the Update method is removed the error will not be thrown however you will not be able to see the changes to the fields.
Check list.update() method and if it is unnecessary then remove it.
Check list.update() method and if it is unnecessary then remove it.
Thursday, December 15, 2011
Set/Update Content Type of new upload file in document library
using (SPSite site = new SPSite(SiteSubSite))
{
using (SPWeb web = site.OpenWeb())
{
web.AllowUnsafeUpdates = true;
//Create file Stream object using save local file
FileStream fstream = File.OpenRead(sourceFilePath);
byte[] content = new byte[fstream.Length];
fstream.Read(content, 0, (int)fstream.Length);
fstream.Close();
SPFile file = web.Files.Add(targetDocumentLibraryPath, content, true);
SPContentType spPdf = file.Item.ParentList.ContentTypes[ContentType.Name.ToString()];
file.Item["ContentTypeId"] = spPdf.Id;
file.Item["Content Type"] = spPdf.Name;
file.Item.SystemUpdate();
file.Update();
}
}
{
using (SPWeb web = site.OpenWeb())
{
web.AllowUnsafeUpdates = true;
//Create file Stream object using save local file
FileStream fstream = File.OpenRead(sourceFilePath);
byte[] content = new byte[fstream.Length];
fstream.Read(content, 0, (int)fstream.Length);
fstream.Close();
SPFile file = web.Files.Add(targetDocumentLibraryPath, content, true);
SPContentType spPdf = file.Item.ParentList.ContentTypes[ContentType.Name.ToString()];
file.Item["ContentTypeId"] = spPdf.Id;
file.Item["Content Type"] = spPdf.Name;
file.Item.SystemUpdate();
file.Update();
}
}
Error: "Cannot open database "WSS_Content_...." requested by the login. The login failed. Login failed for user ... "
Today I am converting word to PDF file using Word Automation Service, its throw error like "Cannot open database "WSS_Content_...." requested by the login. The login failed. Login failed for user ... "
Solution :
I have open IIS manager and click on the Application pool. Selected respected site's pool and apply valid user authentication over there. After reset IIS and checked my feature.
Its Working...
Enjoy...
Solution :
I have open IIS manager and click on the Application pool. Selected respected site's pool and apply valid user authentication over there. After reset IIS and checked my feature.
Its Working...
Enjoy...
Sunday, December 11, 2011
Enable Riboon Button for specific list and single item selection
<CommandUIHandlers>
<CommandUIHandler Command="ListDocumentMerge_Test_Button" CommandAction="~site/_layouts/ListDocumentMerge/DocumentMerge.aspx?List={ListId}&ID={SelectedItemId}"
EnabledScript="javascript:function singleEnable() {
var items = SP.ListOperation.Selection.getSelectedItems();
var ci = CountDictionary(items);
var listId = SP.ListOperation.Selection.getSelectedList();
if (ci == 1 && listId == '{B8701B6B-8CB7-4105-852F-4C685F580A63}')
{ return true; }
return false; }
singleEnable();" />
</CommandUIHandlers>
Programmatically add Custom action in SharePoint 2010
If you need to create a ribbon button that applies to a specific list in a farm deployment scenario you must write some code in a feature event receiver to create an SPUserCustomAction class as so:
SPList list = web.Lists["SomeList"];SPUserCustomAction action = list.UserCustomActions.Add();action.Title = "Do Something";action.Description = "Sample ribbon button";action.ImageUrl = "/_layouts/images/centraladmin_backupandrestore_granularbackup_32x32.png";action.Location = "CommandUI.Ribbon.ListView";action.Sequence = 0;action.Url = "javascript:DoAction();";action.CommandUIExtension =@"<CommandUIExtension xmlns='http://schemas.microsoft.com/sharepoint/'> <CommandUIDefinitions> <CommandUIDefinition Location='Ribbon.Documents.Manage.Controls._children'> <Button Id='Sample.DoSomething.Button' Command='Sample.DoSomething' Image32by32='/_layouts/images/centraladmin_backupandrestore_granularbackup_32x32.png' Image16by16='/_layouts/images/centraladmin_backupandrestore_granularbackup_32x32.png' Sequence='0' LabelText='Do Something' Description='Sample ribbon button' TemplateAlias='o1' /> </CommandUIDefinition> </CommandUIDefinitions> <CommandUIHandlers> <CommandUIHandler Command='Sample.DoSomething' CommandAction='javascript:DoAction();' EnabledScript='javascript:EnableDoAction();'/> </CommandUIHandlers></CommandUIExtension>";
action.Update();
SPList list = web.Lists["SomeList"];SPUserCustomAction action = list.UserCustomActions.Add();action.Title = "Do Something";action.Description = "Sample ribbon button";action.ImageUrl = "/_layouts/images/centraladmin_backupandrestore_granularbackup_32x32.png";action.Location = "CommandUI.Ribbon.ListView";action.Sequence = 0;action.Url = "javascript:DoAction();";action.CommandUIExtension =@"<CommandUIExtension xmlns='http://schemas.microsoft.com/sharepoint/'> <CommandUIDefinitions> <CommandUIDefinition Location='Ribbon.Documents.Manage.Controls._children'> <Button Id='Sample.DoSomething.Button' Command='Sample.DoSomething' Image32by32='/_layouts/images/centraladmin_backupandrestore_granularbackup_32x32.png' Image16by16='/_layouts/images/centraladmin_backupandrestore_granularbackup_32x32.png' Sequence='0' LabelText='Do Something' Description='Sample ribbon button' TemplateAlias='o1' /> </CommandUIDefinition> </CommandUIDefinitions> <CommandUIHandlers> <CommandUIHandler Command='Sample.DoSomething' CommandAction='javascript:DoAction();' EnabledScript='javascript:EnableDoAction();'/> </CommandUIHandlers></CommandUIExtension>";
action.Update();
Subscribe to:
Posts (Atom)