Skip to main content

Posts

Async Plugins vs. Power Automate Flows

CRM 4.0: Query Parameters for new Activity records

In the blog of  Stéphane Dorrekens  he wrote about the ability to use query parameters in CRM 2011 and CRM 4.0. As for CRM 4.0 there is a limitation for custom parameters as well as the usage of activity field names as query parameters for new activity records. If you create a new activity in CRM 4.0 it usually redirects to e.g. "/activities/appointment/edit.aspx". With this url you cannot add a query parameter like "subject=Test Appointment" or any other field like you could do for accounts or other entities in CRM 4.0. To workaround this issue you can use this approach instead to reach your final goal: You must use the URL "/userdefined/edit.aspx? etc =4201". Now you can set the " etc "-parameter to the correct object type code. (/sdk/list.aspx to find out the right code) After this you can use the same technique like for accounts, contacts, etc. (e.g. subject="Test") to prefill the new activity.

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...