Skip to main content

Posts

Showing posts from 2011

XrmToolBox: AutoNumberUpdater - new StateCode filter

SharePoint 2010: Taxonomy field and System.UnauthorizedAccessException

These days I had a problem with provisioning a list instance of a custom list definition which uses a taxonomy field. This feature is part of a custom site definition also. Interestingly I was able to use my site defintion to create a new site collection. All custom lists that had my taxonomy field on it did not make any trouble in this instance. But when I tried to create a sub web site with the same site definition the provisiong stopped with the following error: 10/27/2011 16:55:51.24 w3wp.exe (0x21D0) 0x197C SharePoint Foundation Feature Infrastructure 889w High The element of type 'ListInstance' for feature My.SiteDefinitions.Project.SGD_ProjectLists' (id: b7cbc5b3-decd-48ff-aa23-29fb7a0223f7) threw an exception during activation: Exception has been thrown by the target of an invocation. 0c0e2c1b-db4f-4619-911f-116a086ba2c1 10/27/2011 16:55:51.24 w3wp.exe (0x21D0) 0x197C SharePoint Foundation General 72by High Feature Activation: Threw an exception, attempting...

SharePoint 2010: Error on publishing a custom content type via content type hub

Recently I tried to publish a custom content type of my content type hub from within a feature receiver and received the following error: 10/27/2011 09:17:14.74 w3wp.exe (0x20A8) 0x0F5C SharePoint Server Taxonomy fj2u Unexpected Content type publish failed with exception. Proxy MMS - CTH. Content type IT Document Set. System.ServiceModel.CommunicationException: An error occurred while receiving the HTTP response to http://sgdv01101:32843/8c74a6e67762437ea1547ee5f61d6236/MetadataWebService.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ...

CRM 2011: SiteMap - Unknown Group ID Names Bug

After migration of CRM 4.0 to CRM 2011 the resource strings in site map of the settings area are not updated correctly (yellow marks): IS: < group id ="Business_Setting" > < group id ="System_Setting" > < group id ="Customizations" > < group id ="ProcessCenter" > SHOULD BE: < group descriptionresourceid ="Menu_Label_Business" id ="Business_Setting" resourceid ="Menu_Label_Business" > < group descriptionresourceid ="Menu_Label_System" id ="System_Setting" resourceid ="Menu_Label_System" > < group descriptionresourceid ="Homepage_SystemCustomization" id ="Customizations" resourceid ="Homepage_SystemCustomization" > < group descriptionresourceid ="Menu_Label_ProcessCenter" id ="ProcessCenter" resourceid ="Menu_Label_ProcessCenter" > Through a new solution ex...

SharePoint 2010: SharePoint WebControls mystery

During a project I created a very complex custom newform.aspx / editform.aspx. Usually a custom RenderingTemplate uses the < SharePoint:ListFieldIterator ID="ListFieldIterator1" runat="server"/> control to automatically iterate all fields belonging to that list. But if you use field controls yourself, the ListFieldIterator is so smart not to render that field again. In my case I had to use the same field two times in different views in a multipage tab strip scenario. Within the first view I used this tag: < SharePoint:TextField ID="TextFieldViewA" runat="server" FieldName="TestField" /> In the second view this one: < SharePoint:TextField ID="TextFieldViewB" runat="server" FieldName="TestField" /> When rendering the custom page, SharePoint will only respond to changes on the second field. Somehow SharePoint uses the latest control in the control collection to update and persi...

How to correctly display a SPFieldCalculated with datatype DateTime

In this blog I want to talk about my recent experiences with displaying values from a SPFieldCalculated field with datatype "DateTime" in another Web control (asp textbox or label). My first approach was this: // Get calculated due date field values and set them in the textboxes SPFieldCalculated cf3Due = (SPFieldCalculated)SPContext.Current.ListItem.Fields[ "Due date" ]; DueDateField.Text = cf3Due.GetFieldValueAsText(SPContext.Current.ListItem[ "Due_x0020_date" ]); Later I figured out that using the first approach will not correctly apply timezone and region settings to the current datetime values. My next approach solved my issue with displaying the right datetime in the right timezone. But it took me several hours to find out this freaking solution. System.Globalization.CultureInfo ci = null ; SPRegionalSettings regSettings = null ; var user = SPContext.Current.Web.CurrentUser; // Always perform a Null-Check on SPUser.RegionalSettings ...

Struggling with SharePoint Field Controls (BooleanField)

In my code-behind I tried to set the CssClass property of a Microsoft.SharePoint.WebControls.BooleanField field during Page_OnLoad. During a debug session I could find out, that this control's CssClass property is "ms-input" by default. I overwrote it by different class name. This field gets rendered on the page like this: <TD class="ms-formbody No-Borders" vAlign=top align=middle><SPAN dir=none><INPUT id=ctl00_m_g_6796b238_94c6_47ff_bf38_ca66daa7a0d5_ctl00_AlertFormContent1_ConfirmationField_ctl00_BooleanField title="Quality Confirmation" type=checkbox name=ctl00$m$g_6796b238_94c6_47ff_bf38_ca66daa7a0d5$ctl00$AlertFormContent1$ConfirmationField$ctl00$BooleanField><BR></SPAN></TD> As you can see SharePoint actually does not render any CSS class style on this input field type. I am wondering why the CssClass is available and set by a default value although it does not get rendered. I would like to know why...

SharePoint 2010: Bug in Advanced Search Webpart

Today I found a nasty bug with the AdvancedSearchWebpart: I put the wepart on a standard web part page: Then I went into edit mode and deselected the other search text box fields so that I only have the first one "All of these words": Then I entered a search string "test" to see what's happening: The result was this:  I turned on the debugger to find the place where the error appeared: It crashed in the method "ComposeTextSectionQuery" because the hidden fields won't be rendered and therefore the attempt to access "elements.PhraseQueryTextBox.value" will result in the error mentioned above. I thought this was fixed with MOSS2007 already. Is Microsoft going steps backward with SP2010? I hope this will get fixed soon!

CRM 2011 New Entity form and F5 refresh issue

Today I had this situation: I created a new account I saved the new account I started a workflow I hit F5 to refresh the window to see the changes in my newly created account. Issue: Instead of getting the form of my newly created account the refresh gave me another new empty account form! So what the heck is happening here? After some research with the IE8 Developer Tool I found out that the entity window are actually two windows: The main entity window with the ribbon bar The inner window (IFrame), which actually includes the entity's edit form and JavaScript handlers/event code. The main window has the following URL: http://mucdevcrmdb01:22222/MyCompany/main.aspx?etc=1&extraqs=%3fetc%3d1&pagetype=entityrecord The inner window (IFrame): http://mucdevcrmdb01:22222/MyCompany/userdefined/edit.aspx?etc=1&id=%7b717BBB91-B59C-E011-8A01-00155D59091B%7d&pagemode=iframe&sitemappath=Workplace%7cMyWork%7cnav_activities Issue/Bug: After creating a new ent...

Migration of CRM 4.0 to CRM 2011

In this blog I will show you all the steps it took for me to migrate an CRM 4.0 organization to CRM 2011: 1. Created backups of my CRM 4.0 organization DB and report server DB 2. Imported backups on target environment / SQL Server 3. Connected report server instance to my imported CRMReports DB 4. Restored the SSRS encryption key (you need a password for your encryption key file) 5. Within the CRMReports DB in the table "Key" I deleted multiple entries so that it should look like this: 6. Started the Deployment Manager: 7. Started to import organization: 8. Selected my restored CRM 4.0 organization DB 9. Finished auto-mapping of AD-users and replaced one of the old CRM administrator accounts with my current new administrator account (might not be important for you). 10. Clicked next and started the migration. 11. Error appeared: 12:42:11| Error| Exception occured during Microsoft.Crm.Tools.Admin.OrganizationUpgrader: Fehler bei der Aktion Microsoft.Crm.Tools.Ad...