Nintex Workflow Activity Template for Visual Studio

Nintex offers some project templates for Visual Studio. One for an activity and one for an action adapter. You can download them from Nintex SDK: Installing and using Visual Studio templates.

I installed and used them to develop a new activity. After creating a new solution with adapter and activity using Namespaces you get a bunch of errors.
My Namespace is “AtiaNuur.NintexWorkflows”. Here are my steps to setup und correct the two projects:

  • Create new Project of type Nintex Adapter
    • Name “AtiaNuur.NintexWorkflows.HelloWorld”
    • Solution HelloWorld
  • Set SolutionId in package to new Guid (Nintex creates allways the same SolutionId)
  • Add Project of Type Nintex Activity using Name “AtiaNuur.NintexWorkflows.HelloWorldActivity”
    • Change default Namespace to “AtiaNurr.NintexWorkflows.HelloWorld
  • In File AtiaNuur.NintexWorkflows.HelloWorldActivity.cs
    • remove Namespace in class Name
    • Also remove Namespace in PropertyDependencies
    • Remove ‘Activity’ from namespace

The File AtiaNuur.NintexWorkflows.HelloWorldActivity.cs should look like this now:

  • In AtiaNuur.NintexWorkflows.HelloWorldDialog.aspx.cs
    • Remove namespace in classname
  • In AtiaNuur.NintexWorkflows.HelloWorldDialog.aspx
    • Shorten Filename
    • Set new filename in NWAFile
    • Set new filename in .aspx prefix tags
    • Remove duplivate namespace in tag Page
  • Add new EmptyElement “NWAFile”
    • Delete Element.xml
    • Move *.nwa file into EmptyElement
    • Set DeploymentType to ElementFile
  • In .nwa File
    • Set Name, Category and Description
    • <ActivityType>AtiaNuur.NintexWorkflows.HelloWorld.HelloWorldActivity</ActivityType> insert Activity classname
    • <ActivityAssembly>AtiaNuur.NintexWorkflows.HelloWorldActivity, Version=, Culture=neutral, PublicKeyToken=529ebf25b8a73f63</ActivityAssembly> get your own full filename using ILSpy
    • Remove duplicated Namespace in AdapterType
    • Correct icon filenames
    • Correct ConfigurationDialogUrl
  • In package > Advanced
    • Add Activity Assembly
  • In File “AtiaNuur.NintexWorkflows.HelloWorldAdapter.cs”
  • Create Feature according to
    • Add Event Receiver
    • Change NWAFile Name and Path
    • Change Adapter Class Name

SharePoint Survey – Where People and Group field data is stored in database

In general survey data is saved in SQLs AllUserData Table in the Content Database. But the data for a “people and group” field is not. This data is stored in the AllUserDataJunctions table.
You can use the following SQL statement to get the People for a survey list with title “MySurvey”. You should also filter the result by FieldID, if you have more than one people and group field:

FROM [SP230_Inhalt_Inet].[dbo].[AllUserDataJunctions]
Join [SP230_Inhalt_Inet].dbo.AllUserData on AllUserData.tp_DocId = AllUserDataJunctions.tp_DocId
Join [SP230_Inhalt_Inet].dbo.AllLists on AllLists.tp_ID = [AllUserDataJunctions].tp_SourceListId
Where tp_Title = 'MySurvey'

Problems with anonymous access for External Lists using Publishing Feature

While setting up external lists on a SharePoint 2013 Site Collection for anonymous access we came across a problem. We started the configuration of the External Content Type as explained in many blogs (Thanks Prashanth) :

1. Create the External Content Type in SharePoint Designer
2. Give execute permissions to a specific user (i.e. Max Mustermann) for the External Content Type, the BDC Model and the External System via central administration.
4. Export the External Content Type from SharePoint Designer (There is an option to export the External Content Type from Central Administration as well, but it doesn’t export all the details. You have to use the export function of SharePoint Designer).bild2
5. Open the exported bdcm-File in text editor. The exported file includes <AccessControlEntry> elements that specify what rights an individual user or group has to the External Content Type. Adding users to the BCS permissions via Central Administration creates additional entries in the XML of the model.  Look for <AccessControlList>-Entries in the whole document and replace the entries that where created for Max Musterman with the following:

Before After
<AccessControlEntry Principal="domain\max.mustermann">
<Right BdcRight="Execute" />
<AccessControlEntry Principal="NT Authority\Anonymous Logon">
<Right BdcRight="Execute" />

6. Save the file and go back to central administration.
7. Delete the External Content Type and the connected bdcm model and external system from business data connectivity service.

8. Import the bdcm-File into Central Administration with Permissions.bild5

We noticed that this scenario worked on most of our SharePoint servers, but not on every server. It took me a while to find out what the difference between the server configurations was. At first I found out, that it doesn’t work on the servers, where the SharePoint Publishing Feature is enabled. But it didn’t help to just disable the feature. After some googling I found the solution (Thanks Russ). There is a hidden feature named ViewFormPagesLockDown, which, if enabled, prevents anonymous user from accessing certain areas of a site collection.

9. You can disable it via PowerShell.

$lockdown = get-spfeature viewformpageslockdown

disable-spfeature $lockdown -url https://sitecollection


After disabling the feature via PowerShell, anonymous users where able to access my external list.

And if the list still isn’t loading, check if the anonymous users have  permissions on the root site collection to see the rendering templates, or just change the redering-mode of the list to server-side rendering.

SharePoint Page Layout Error: Only Content controls are allowed directly in a content page that contains Content controls

Today I got the following error, when I wanted to open and edit a page based on a custom page layout: Only Content controls are allowed directly in a content page that contains Content controls.

I found a lot of blog entries about that topic, and thanks to this one I finally found the solution:

The cause of the problem is a improper case for the control tags the page layout. Some of the contorls in my page layout used a lower case “c” instead of an uppercase “C”. I just changed <asp:content> to <asp:Content> in the whole document and afterwards all the pages based on that layout worked again.

SharePoint 30 minute Timeout for forms

I noticed that when you open a form in SharePoint and start to fill it out, SharePoint will time out that form after 30 minutes.

If you are filling out a form with a lot of data, or if you have to stop working on a form for a few minutes, this is very annoying because after 30 minutes all the work will be gone and you have to start filling the form all over again.

Here’s the solution:

PS> $SPSite = Get-SPSite("https://portal.lab.intern")
PS> $webApp = $SPSite.WebApplication
PS> $webApp.FormDigestSettings

Enabled Expires Timeout UpgradedPersistedProperties
——- ——- ——- —————————
True False 0:30:00 {}

PS> $webApp.FormDigestSettings.Timeout = New-TimeSpan -Hours 8
PS> $webApp.Update()

CustomAction isn’t showing for a content type

I ran into this problem today. I created a CustomAction that should show up in the DisplayForm of all Items having a specific content type, but it didn’t.

Here’s the simple solution:

It’s causing problems when content types don’t have all capitals in the identifier, both for the definition and when using. So I changed the RegistrationId to the following:

Disable Scrollbar in Page Viewer WebPart

Use a Content Editor WebPart instead with the following HTML:

<iframe name="Iframe" src="yourURL" scrolling="no"
FRAMEBORDER="0" style="width:100%; border:0;  height:100%; overflow:hidden;">

1. Add a Content Editor WebPart to the Page
2. Click “Edit WebPart”
3. In Ribbon Tab “Format Text” click “Edit Source”
4. Copy and paste the code above into the “Edit Source”-window and replace “yourURL” with the URL you want to be displayed in the WebPart. Set the size of the WebPart to your needs.