Category Archives: Technical

Lightning Flow (Cloud Flow Designer) – Applying a CSS

Lightning Flow provides declarative process automation for every Salesforce app, experience, and portal with two point-and-click automation tools: Process Builder and Cloud Flow Designer.

Cloud Flow Designer allow you to configure screens and conditions and branch that along based on the users input.

Continue reading Lightning Flow (Cloud Flow Designer) – Applying a CSS

Loading JQuery Globally for Sharepoint Online

The pain in customizing Sharepoint Online is real! cheapest viagra sale how much cialis cialis for sale usa

But Jquery can make it so much easier. viagra new zealand buy online generic viagra for sale

To do so, have Sharepoint Designer ready, browse to the master page that you are using. tadalafil low price cheap cialis cialis 5mg daily price

Add the following into your masterpage. viagra da 20 mg when should you take a viagra pill

<!–SPM:–> buy cialis rate generic viagra buy viagra online in india

The above code will load the jquery globally on the masterpage and you dont have to deal with making sure it reference everytime or in JS files.

Sharepoint Online – Office 365 Branding (Top Navigation Bar)

As more and more enterprise are embracing Cloud and Office 365, I thought that this will be a great time to start writing up on branding your Sharepoint Online, which comes part of the package with Office 365.

Sharepoint Online comes configured with the Top Navigation Bar for you.  But we want to hide it, as i dont have all the Sites that I created to be shown in that portion.

O365-SP Online - Top Navigation
Use the following .css to hide the “HR” and “Search”.


.ms-breadcrumb-top  {
display: none;
}

You can add the following the master page or add this to a content editor webpart.

Change a specific K2 smartforms View background colour

Recently, I was asked this question on how to change the background colour of a specific View in a K2 smartforms Form. Like the following:

Change specific View background colour
Change specific View background colour

How to change a specific K2 smartforms View backgound colour

I’ve done some research and testing, and here is the CSS that will do the trick:

The number 2 in the line “nth-of-type(2)”, means the 2nd View in the Form. So if you need to just highlight the 3rd View, change the value to 3 and you are done.

Where to put this piece of style?

If you have a custom Theme and you want all Forms using this Theme to have the same effect, then you should add this style to your Theme’s CSS file.

If you only have to  make the change on a specific form, you can use a hidden Data Label to apply the theme. This is how to do it:

  1. Add a Data Label to your Form.

    Step 1 - Add Data Label
    Step 1 – Add Data Label
  2. Add the following line to the Text property. Remember to update the row number.

  3. Uncheck the Visible property. We don’t need the user to see this value.

    Step 3 - Uncheck Visibile
    Step 3 – Uncheck Visibile
  4. Check the Literal property. We need the control to parse the style tag.

    Step 4 - Check the Literal property
    Step 4 – Check the Literal property
  5. Finish the Form and you are done.

 

So that’s how you change a specific K2 smartforms View background colour.

Have Fun!

K2 Exchange OOFSettings

I’ve just posted K2 Exchange OOFSettings service broker at K2 Community site. This broker uses the EWS Managed API to access the Out-of-Office information on the Exchange server.

Where to get the broker?

The broker can be downloaded from:

Limitations of the K2 Exchange OOFSettings broker

This is the list of limitations of this broker:

  • Since the EWS API requires the user’s login name and password to execute the web service, the broker needs to run under SSO authentication mode. The selected authentication mode must be an AD security provider.
  • The email address will be retrieved via the System.DirectoryService.AccountManagement API, so make sure the user has a valid email address in AD.
  • When UseAutoDiscover service key is set to true, the broker will make use of the user’s email address to auto discover the Exchange server’s URL. See the following link on how to configure auto discover service for Exchange. https://technet.microsoft.com/en-SG/library/bb201695(v=exchg.141).aspx.

Service Instance Setup

As the broker requires the user’s login name and password to execute the EWS call, the service instance must be set up to use SSO Authentication Method and and AD security provider (by default, K2) must be selected.

SSO Authentication Mode
SSO Authentication Mode

The following are the description for the service keys:

Service Keys
Service Keys
  • UseAutoDiscover – Whether to lookup the URL using the Auto Discover service.
  • RequireHTTPS – Whether to enforce that the Exchange server’s URL needs to use the HTTPS scheme.
  • EwsURLFallback – The Exchange server’s EWS URL to be used when the broker fails to get a valid response from the Auto Discover service or when the UseAutoDiscover key is set to false.

Available Methods in K2 Exchange OOFSettings broker

This is the list of methods available:

Get OOF Settings

This method grabs the current selected user’s out of office settings from the Exchange server.

K2 Exchange OOFSettings - Get OOF Settings method
Get OOF Settings method

Turn On OOF Notification with Schedule

This method allows the user to turn on the out of office notification, set the reply email content and most importantly set the start and end date/time.

K2 Exchange OOFSettings - Turn On OOF Notification with Schedule
Turn On OOF Notification with Schedule

Turn On OOF Notification Permanently

Well, this method is the same as the previous one, except that there is no start and end date/time defined. It will be turned on as long as required.

K2 Exchange OOFSettings - Turn On OOF Notification Pernament
Turn On OOF Notification Permanent

Turn Off OOF Notification

This method will turn off the out of office notification.

K2 Exchange OOFSettings - Turn Off OOF Notification
Turn Off OOF Notification

 

Have Fun!

K2 smartforms Custom Control Icon

In this article, I’m going to describe how to add a K2 smartforms custom control icon. The official article is located at help.k2.com but it is not 100% accurate and contains mistakes in the CSS sample. Here’s the step by step guide:

Create the icon

The basic requirements of the K2 smartforms custom control icon is that it needs to be a 16×16 pixel image. In this sample, I’ll be using the Microsoft Paint application to create it.

  1. Search for your Paint application in your Windows Start menu and launch it.

    Find MS Paint
    Find MS Paint
  2. In your Paint application, click on Files > Properties.

    MS Paint Properties option
    MS Paint Properties option
  3. Set the Width and Height of the image to 16 and click OK.
  4. Draw your icon and save it. In my sample, I’ve saved my image in PNG format.

Adding the icon to your custom control

Now, here are the steps to add your K2 smartforms custom control icon:

  1. Add the icon to your VS project.

    Add icon to VS project
    Add icon to VS project
  2.  You will need to set the icon as a Embedded Resource. So right click on the icon, click on Properties and select Embedded Resource under Build Action.

    Set icon Build Action to Embedded Resource
    Set icon Build Action to Embedded Resource
  3. Add the icon as a WebResource in your control code file. Do take note that your resource name starts with the [Project Name], [Folder Name] and ends with the [Icon File Name], separated by a full stop (.). You should update the resource type, if you are not using a PNG file like me in this sample.

    Add icon as WebResource
    Add icon as WebResource
  4. You will need to add the K2 smartforms custom control icon styling in your control’s CSS file now. In the style sample below, you will need to replace a) the control name from “digital signature” to your control’s name and b) update the icon’s WebResource URL to the one you just created in the section above. Note: The CSS style provided at help.k2.com does not include spaces that separates the css class name. This causes the style to not function in your browser.
  5. Since we indicated WebResource usage in our CSS file, we will need to ensure PerformSubstitution attribute is set to true on the CSS WebResource declaration in the control file.

    PerformSubstitution = true
    PerformSubstitution = true
  6. Ensure that the CSS file reference is added in the constructor of your control class.  Replace the WebResource URL for your CSS file in the sample below.

View my K2 smartforms custom control icon!

Now, to view your new K2 smartforms custom control icon, you will need to:

  1. Compile the VS project and deploy your custom control.
  2. Ensure that your IIS has been reset.
  3. Clear your browser cache, log into your K2 Designer site and see your new K2 smartforms custom control icon in action!

    Look at my K2 smartforms custom control icon!
    Look at my K2 smartforms custom control icon!

Enjoy!

After Parse.com

With the recent announcement of Parse.com winding down their service, a lot of developers will be left stranded. viagra generico ou similar

The good people at Parse have release and open-source their service on Github. viagra rx

  1. Parse Server – https://github.com/ParsePlatform/parse-server cialis pills 10 mg

2. Parse Server Example – https://github.com/ParsePlatform/parse-server-example

But, the catch here is the dashboard that we are used to are gone. Parse is not releasing the dashboard along with the source code and the analytics portion.  Ok, they heard all the developers and are trying to release the code, but in the mean time this tutorial still works!

Now, today I am going to show how we can leverage and alternative dashboard to connect to Parse.

In this article, I will be using the Parse Server Example and deploy to Heroku using the free tier. This will apply if you are hosting this on your on VPS as well.

Follow the instruction provided by the Parse team, set it up on Heroku free tier ( I am not covering this but if there’s a need, I am happy to provide the instruction).

Parse Server Example - Heroku buy jelly viagra online

Once everything is setup and tested on Heroku.

We are going to using AdminMongo to connect to it as Parse.com is using MongoDB as the datasource.

AdminMongo – https://github.com/mrvautin/adminMongo

Follow the instruction to clone the adminMongo to the local or VPS of your choice and run it.

Parse Server - AdminMongoDB

In your Heroku Dashboard, access the MongoLab interface.

Parse Server - Heroku Dashboard

This should give you the exact connection string to connect to MongoDB. Now go to your AdminMongoDB and add that connection in the exact format provided by the MongoLab.

PS: At this stage, I do suggest creating a different user account to access the MongoDB.

Parse server - AdminMongoDB connection

Connect to the instance and you have access to the tables and data  created by Parse. vrouwen viagra pillen

I know this is still a long way from the dashboard provided by Parse, but its definitely a interim solution till Parse release their dashboard.

List Sequence Number Display

K2 smartforms List Sequence Number Display

Recently, I’ve published a K2 smartforms custom control, List Sequence Number Display at K2 Community (http://community.k2.com/t5/K2-blackpearl/List-Sequence-Number-Display-Field/ba-p/85348).

What does the List Sequence Number custom control do?

It helps you print running numbers on the first column of your List View.

List Sequence Number Display in action
Running number after performing a sort on the column header.

But I can already do that with a SQL View or SQL Stored Procedure…

Well, yes you can, but can your solution:

  1. Add running numbers without altering the original data source?
  2. Can it be do the same for data sources other than SQL?
  3. Can it keep the numbering across different pages? (i.e. pagination)
  4. Can it keep the numbering after a executing sort? (i.e. click on the column headers)
  5. Can it update the numbering adding a new record row? (i.e. adding a new row in a editable list)

So, if you solution can’t do it, then go on and try the List Sequence Number Display custom control! =)

Some things I’ve learned while developing the List Sequence Number Display control

Just to share some of the things I’ve learned from developing this custom control

The parent grid’s html entity ID is always the first set of Guid of my control’s Guid combination

If you look at the generated custom control’s ID via a browser’s Developer Tool, you will see something similar to the following:

Viewing the List Sequence Number Display control from Developer Tool
My custom control’s html entity ID

In my sample here, the div tag’s ID is “b113bc00-d8f7-4ce5-ae81-be2a0ecfe68d_5a10bfd9-f955-41b2-87f7-17e88cd158db”. So if I want to find the Grid which my control resides in, I just need to get the first set of GUID (b113bc00-d8f7-4ce5-ae81-be2a0ecfe68d), separated by the underscore symbol (‘_’) and look for the GUID combination in the ID of a “div” tag with the class name “grid”.

Viewing the List Sequence Number Display control from developer tool 2
Parent grid with the GUID as part of the ID.

This is the piece of JQuery I use to get my grid handle.

If you notice, it also checks if the parentIDString found starts with “00000000-“. This is to handle case where by the grid’s View is not within a Form.

 

Using MutationObserver

The grid has its own JavaScript class with does not expose any event handlers. So the only solution I can come up with is to use MutationObserver to listen to DOM changes. The biggest down side to this approach is that in Microsoft’s Internet Explorer (IE), only version 11 has a proper implementation of this API. In other browsers like Google Chrome, Firefox and Safari, it’s been the default since who knows when, so there’s no problem in executing the control in these browsers.

So what are the changes I’m listening to?

Based on my first set of  observations for display-only view:

  1. On the grid’s div tag, the “pagesize” attribute will be changed whenever a column sort occurs.
  2. On the grid’s div tag, the “listrefreshed” attribute will be written and changes when a list refresh occurs.
  3. On the grid’s div tag, the “actiontype” attribute will change when a row editing event occurs.

With these information, my first observer looks like this:

On my second observation on editable view:

  1. The “pagesize” attribute will not be written in the grid’s tag. So I can use this to confirm whether the current grid is an editable view.
  2. Since there’s no paging in an editable list view, the usual attributes in my first observation cannot be used to trigger the observer. From subsequent testing, I also found that there’s no other usable attributes to observe for change. My solution then is to listen to the “Column Headers” change by inserting my own custom attribute. It seems that when changes occur on an editable list view, it will refresh the column headers as well.

This is my 2nd observer for editable list view.

That’s all I have!

Well, as the section header says, that’s all I have learned from developing the List Sequence Number Display control. If you are interested in the codes, you can download it from the project from the link at the top of this post. Enjoy!