Posts mit dem Label Sharepoint werden angezeigt. Alle Posts anzeigen
Posts mit dem Label Sharepoint werden angezeigt. Alle Posts anzeigen

Donnerstag, 7. März 2013

ReportServices Add-In für 2013


Der auf der Seite angegebene Link auf das ReportServices Add-In für 2013 funktioniert nicht
Verfügbarkeit des Reporting Services-Add-Ins für SharePoint-Produkte

Durch die Installation von
Microsoft® SQL Server® 2012 SP1 Reporting Services Add-in for Microsoft® SharePoint® 
werden die benötigten Features installiert. ( .../15/TEMPLATE/Features\ReportServer )

Fehlermeldungen:

Failed to instantiate file "ReportViewer.dwp" from module "_catalogswp_Features\ReportServer": Source path "Features\ReportServer\ReportViewer.dwp" not found.

bzw. wird in den SiteSettings einer neuen Teamsite statt der Überschrift "Reporting Services" und den dazugehörigen Unterpunkten nur die Referenzen auf die Resourcen angezeigt.




Freitag, 16. Dezember 2011

Liste aller Sharepoint Features

unter http://bit.ly/shpntftres gibt es eine Liste aller Sharepoint features

Donnerstag, 1. Dezember 2011

Case sensitive Werte in Field Definitions


Attribute vom Typ "boolean" in einer Field Definition sind case sensitive.

Probleme machen vor allem die folgende Attribute:
Filterable="FALSE
ShowInNewForm="FALSE
d.h. immer "FALSE" bzw. "TRUE" verwenden.

Montag, 28. November 2011

BreakRoleInheritance und AllowUnsafeUpdates

Wird auf einem SPWeb-Objekt die Methode BreakRoleInheritance aufgerufen wird der Wert der Property AllowUnsafeUpdates auf false gesetzt.



web.AllowUnsafeUpdates = true;
web.BreakRoleInheritance(false);
web.AllowUnsafeUpdates = true;


Weitere Infos zu AllowUnsafeUpdates unter:
http://hristopavlov.wordpress.com/2008/05/16/what-you-need-to-know-about-allowunsafeupdates/

Montag, 21. November 2011

WebPart Audience


Der string für WebPart.AuthorizationFilter setzt sich wie folgt zusammen:


string[] globalAudienceIDs = new string[] {"e4687e64-c9d8-4860-bbc3-ec036bf9915d"};
string[] dlDistinguishedNames = new string[] {"cn=group1,cn=users,dc=spdev,dc=com", "cn=group2,cn=users,dc=spdev,dc=com"};  
string[] sharePointGroupNames = new string[] {"Demo Members", "Demo Owners"};  
               
string result = string.Format("{0};;{1};;{2}",  
                                    string.Join(",", globalAudienceIDs),  
                                    string.Join("\n", dlDistinguishedNames),  
                                    string.Join(",", sharePointGroupNames));

d.h. soll eine Sharepoint Gruppe hinzugefügt werden sieht der string wie folgt aus :
";;;;Gruppenname" bzw.
";;;;Gruppenname1, Gruppenname2" 



von
Lapointe Blog -Eintrag

Montag, 7. November 2011

Thmxtheme.ApplyTo und SPContext

Sharepoint 2010 Themes können über das ObjectModel nur innerhalb der SiteCollection aktiviert werden, auf die sich der aktuelle SPContext bezieht.


Die sicherste Methode ist das Theme über einen Web-EventReciever  der auf WebProvisioned reagiert zu setzen. Alle anderen Versuche haben immer wieder zu Problemen geführt.



Siehe auch
http://sadomovalex.blogspot.com/2010/08/fix-security-validation-for-this-page.html

Implement IDisposable Correctly

http://msdn.microsoft.com/en-us/library/ms244737(v=vs.80).aspx


    public void Dispose()
    {
        Dispose(true);
        GC.SuppressFinalize(this);
    }
    // NOTE: Leave out the finalizer altogether if this class doesn't 
    // own unmanaged resources itself, but leave the other methods
    // exactly as they are. 
    ~Resource() 
    {
        // Finalizer calls Dispose(false)
        Dispose(false);
    }
    // The bulk of the clean-up code is implemented in Dispose(bool)
    protected virtual void Dispose(bool disposing)
    {
        if (disposing) 
        {
            // free managed resources
            if (managedResource != null)
            {
                managedResource.Dispose();
                managedResource = null;
            }
        }
    }

MeetingWorkspace in Calendar verstecken

Setzt man das Feld WorkspaceLink eines Kalenders auf hidden kann auch für diesen Kalender kein Meetingworkspace angelegt werden.

var list = web.Lists["Events"];
var field = list.Fields[SPBuiltInFieldId.WorkspaceLink];
field.Hidden = true;
field.Update();


Gefunden auf
http://www.sharepointblues.com/2010/04/26/how-to-remove-workspace-link-from-a-calendar/


Adding a Taxonomy Field

TermStore termStore = session.DefaultKeywordsTermStore;
Group group = termStore.GetSiteCollectionGroup(this.site);
TermSet termset = group.TermSets[0];

TaxonomyField field = (TaxonomyField)list.Fields.CreateNewField("TaxonomyFieldType", name);

field.Required = required;
field.Description = description;
field.SspId = termStore.Id;
field.TermSetId = termSet.Id;
field.AllowMultipleValues = allowsMultiple;
field.EnforceUniqueValues = enforceUniqueValues;
field.IsPathRendered = renderpath;
// field must be indexed to enfoce unique values!
field.Indexed = enforceUniqueValues;
Term anchor = termSet.GetTermByPath(anchorPath);
field.AnchorId = anchor.Id;
field.NoCrawl = noCrawl;

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.taxonomy.taxonomysession.aspx

http://www.communardo.de/home/techblog/2011/10/18/sharepoint-2010-der-termstore-und-der-priviligierte-nutzer/


Was wird durch die folgende Methode veranlasst?
Möglicher Fix für Probleme nach Content Deployment
// Resync the taxonomy hidden list to make sure it is update-to-date
TaxonomySession.SyncHiddenList(site);

DisplaceOnUpgrade
Optional Boolean. If a field definition already exists for the field, TRUE to force updates to field properties with the values that are specified in this field definition.

http://www.sharepointconfig.com/2011/03/the-complete-guide-to-provisioning-sharepoint-2010-managed-metadata-fields/

the default termstore for site cannot be identified

Wird beim Versuch den SiteCollecttion Termstore zu aktivieren die Fehlermeldung
"the default termstore for site cannot be identified" angezeigt, muss in der Central Administration für die Managed Meta Data Service Application die entsprechende Property gesetzt warden.

Wird unter den folgenden URLs genauer beschrieben
http://www.sharepointfabian.com/blog/Lists/Posts/Post.aspx?ID=186
http://www.bfcnetworks.com/the-default-termstore-for-this-site-cannot-be-identified/

Mittwoch, 16. Februar 2011

Do not use "MaintainScrollPositionOnPostBack = true" in WebParts

Using "this.Page.MaintainScrollPositionOnPostBack = true" will break javascript functions on the Webpage

Adding a ListViewWebPart to Page


[UPDATE 01.Feb.2012: wp.ViewGuid = string.Empty gilt nur für 2007]
Hier eine Erklärung für 2010
[ENDUPDATE]
[UPDATE: Set View to "Summary View"]


using Microsoft.SharePoint;
using Microsoft.SharePoint.WebPartPages;

// Get a reference to a web and a list
SPSite site = new SPSite("http://localhost:8000");
SPWeb web = site.OpenWeb();
SPList list = web.Lists["Contacts"];

// Instantiate the web part
ListViewWebPart wp = new ListViewWebPart();
wp.ZoneID = "Left";
wp.ListName = list.ID.ToString("B").ToUpper();
// wp.ViewGuid = list.DefaultView.ID.ToString("B").ToUpper();
// Set the ViewGuid to string.Empty to get the "Summery View"
// including the "Add New Item"-Button
// Thanks to sadomovale
wp.ViewGuid = string.Empty;
// Get the web part collection
SPWebPartManager mgr = new SPWebPartManager("default.aspx", Storage.Shared);
// Add the web part
coll.Add(wp); 


Montag, 22. November 2010

Managed MetaData

TechNet: Managed metadata overview (SharePoint Server 2010)

This article introduces the core concepts about managed metadata, and then describes the way you use managed metadata. An example is used throughout this article to illustrate the concepts. The final section presents several benefits of incorporating managed metadata into your SharePoint Server 2010 solution.

Adding a managed metadata column to a list via SharePoint Server 2010 object model
my solution for adding managed metadata type field to lists.
By Peter Holpar

Sonntag, 21. November 2010

Donnerstag, 28. Oktober 2010

Never remove SharePointWebControls:TextField runat="server" FieldName="Title"



<PublishingWebControls:EditModePanel runat="server" CssClass="edit-mode-panel">
<SharePointWebControls:TextField runat="server" FieldName="Title" />
</PublishingWebControls:EditModePanel>


Why?? What was the Problem

Dienstag, 26. Oktober 2010

How to Add a ListViewWebPart to a Publishing Page

neuer Versuch das ListViewWebPart zu verstehen







Adding a ListViewWebPart to a "Publishing Page" is easy.
Create a Instance of a SPWebpartmanager, with the relevant Page-Url and get the WebPartCollection.
Create a new ListViewWebPart instance, set the ListID to the ID of SPList object you want to show.
Provide a ViewID to the Webpart and add it to the Collection, including the ID of the WebPartZone and a Sequence Number for the order within the zone.


Showing a Document Library including the "Add document" Button  isn't easy at all.
In the UI it is just a click away -> Edit WebPart ->  select ToolbarType and set it to "Summary ToolBar".
I think its almost default in UI.

[UPDATE: see adding-listviewwebpart-to-page]
If you want to use OM to add this WebPart you have to use a "hack" by modifying the schema of the used view. Which can affect also the view of the document library.
Jalil Sear describes it at his blog listviewwebpart-programatically-setting-the-toolbartype-property/


I worked around this issue by adding my own "Add Document" button to the page, having the possibillity of positioning, using audiences and renaming.

Multiselect in MultiChoice

To get a default Selection of a Multichoice Field defined in a listdefinition
use the DefaultFormula-Tag


<list>
<CHOICES>
<CHOICE>Legal</CHOICE>
<CHOICE>Tax</CHOICE>
<CHOICE>Accounting</CHOICE>
<CHOICE>Asset Liability Management</CHOICE>
<CHOICE>Shareholdings</CHOICE>
<CHOICE>Risk Management</CHOICE>
</CHOICES>

<DefaultFormula>=";#Legal;#Tax;#Accounting;#Asset Liability Management;#Shareholdings;#Risk Management;#"</DefaultFormula>

</list>