Welcome to the Synergy Technical Blog and Technical Knowledge Base – a resource that shares intelligent and creative solutions that have been built and implemented on real-time projects on behalf of Velocity clients.

K2 SmartForms

CSS Generic Handler in K2 Smartforms

Recently I had a request to change K2 Smartforms without changing the K2 theme. The K2 theme handles all the look and feel of the form, but the theme can’t be changed in runtime.

K2 injects the selected theme on form load and with a hosted Generic Handler it’s possible to change the styles of the K2 Form dynamically.

Create a Generic Handler in Visual studio with the Context of a .css file. The response content type of the generic handler should be “text/css”. This will return the text in the generic handler as a css file to be loaded in the page. If you don’t know how to create a generic handler you can watch this video https://www.youtube.com/watch?v=2Fz517kKtIE By  Ankit Sethi. Below is a code snip of a css Generic handler:

Read More
K2 blackpearl

Create a Pdf from a Word document in K2 for SharePoint

Overview

This blog post illustrates how to generate a custom solution in K2 to generate a Pdf from a Word document in SharePoint, without making use of 3rd party components.

K2 provides the capability to generate a Pdf out-of-the-box – but is limited to a web page by supplying its URL as well as a smart form. In order to generate a Pdf on the fly for a Word document within SharePoint, WAS or Word Automation Services is utilized to help solve this requirement.

Read More
K2 SmartForms

How to integrate jQuery with K2 SmartForms

Integration of JQuery with K2 Smartforms

JQuery and other client side scripts can easily be integrated with K2 Smartforms through a K2 Smartforms control present in K2 control panel known as ‘HTML Literal’. Developer just need to drag and drop the HTML Literal control which comes out to be Runtime Literal. Developer can just put their code in Runtime Literal and play around with the controls and can execute control events. As JQuery is very much useful for instant feedback, hence the integration of K2 and JQuery makes the application more robust and user-friendly.

Read More
K2 SmartObjects

Passing parameters in URL using K2 workflow

Passing parameters in URL using K2 workflow

When configuring a K2 Client event, K2 allows you to configure a form that is displayed when the user clicks on a worklist item.  Sometimes it’s required to add an additional parameter to the querystring K2 created.  Often, this is an object identifier used to load a database record and this value is used as an identifier.

Configuring the client event to pass querysting information from the K2 designer to the K2 worklist form is as very simple.  The following steps are used to achieve this:

Read More
K2 SmartForms

K2 SmartObject Properties vs Method Parameters

SmartObject Properties vs Method Parameters

When assigning the method bindings of our new SmartObject method. The question is:

When do we need to create and use SmartObject method parameters?

And when do we need to create and use SmartObject properties?

Read More
K2 SmartForms

How to register and use the Excel Control for K2 SmartForms

K2 Smartforms Export to Excel
In this article, we will learn about how to export the SmartObject data to an Excel spreadsheet using the K2 Excel custom control

The Excel control can be downloaded from here.

How to register the Excel Control

Before using the control, you need to register it to make it available in K2 SmartForm designer

Read More
K2 blackpearl

K2 Authentication With Server Failed : The password for this account has expired.

I recently had some issues with the following error (authentication with server failed), which manifested on all work flows being executed on a specific K2 BlackPearl server:

Authentication With Server Failed : The password for this account has expired.

After checking and rechecking all passwords we came to the conclusion that all of them are still valid. What were K2 going on about? Then it dawned upon us that another project was recently deployed to the same server – Could it have something to do with this? And indeed it did.

Read More
K2 blackpearl

How to shrink the K2 Server database log file

It every so often happens that your K2 server’s performance slowly but surely grinds to a halt, and this is often due to the server running out of disk space. The first thing to check in such a scenario is the size of the K2 database log file. It often happens that this file has grown to an unmanageable size.

This file is usually (on a default installation) located at the following location:

D:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\K2_log_1.ldf

Read More
K2 blackpearl

K2 Server stuck in Starting state

When you open your K2 designer in the web browser you often get confronted with an error indicating that no connection could be made because the target machine actively refused it.

k2 server stuck - K2 Server not running

Read More

Please complete the below form and a member of the Velocity IT team will call you back.