Sunday, June 05, 2016

Just passed Nintex Workflow Pro Exam!

I just checked https://learning.nintex.com site, created a free account and passed the pro exam.


And the Admin exam:



Sunday, October 18, 2015

Store the SharePoint filtered values

In case you have a view for your list and users use this view and filter its values and want to keep this filter saved without creating a personal view, you can create a JavaScript file with this content:


 








Then reference this JavaScript file from any page where you have your view. It is simply listen to the “onhashchange” and save the value after the “#” in the localStorage and retrieve it on next page load. The URL of the page after you change the filter looks like this: “/Lists/TestList/AllItems.aspx#InplviewHash6c224f7d-adc4-430c-8501-312cabe57c26=FilterField1%3DLinkTitle-FilterValue1%3DTest%2520Item” and the hash value is everything after the “#”

Saturday, October 17, 2015

Nintex Repeating Section – JSLink

This blog post is building on top other posts by me and my friend Ayman El-Hattab, where in my post (Published April 9, 2015) I talked about creating master details records with repeating section in Nintex forms and Nintex Workflow, and how you can parse the repeating section data and use the information in a workflow “foreach” loop so you can create items in a separate list.

Ayman’s post (Published: Aug 4, 2015) is about displaying the repeating section data in the list view in an easy way, which is mainly by creating a custom field type (Nintex Repeating Section Data). He created two versions 2010 & 2013. But the only problem with this way is that you will need to deploy this field type first as a farm solution, which is not an option in some scenarios like O365 and organizations who do not allow custom server side deployments. Other than that it is a great and easy to use solution.

Why and What is JSLink

So this is why I build this JSLink to make it easy to deploy especially for O365, and if you are coming from Nintex side and don’t know what is JSLink, see this definition:
Client-side rendering is a new concept in SharePoint 2013. It’s provides you with a mechanism that allows you to use your own output render for a set of controls that are hosted in a SharePoint page (list views, display, add and Edit forms). This mechanism enables you to use well-known technologies, such as HTML and JavaScript, to define the rendering logic of custom and predefined field types.” - Muawiyah Shannak - https://code.msdn.microsoft.com/office/Client-side-rendering-JS-2ed3538a (this link has a very good group of samples). You will also need to check the samples published on the Office 365 Patterns and Practices https://github.com/OfficeDev/PnP/tree/master/Samples/Branding.JSLink where they added some reusable templates.

List Column

Starting by creating a list column of type “Multiple lines of text” in the list where we have our Nintex form. Make it a “plain text” in the “type of text to allow”.


Repeating Section

On the form, drag and drop the repeating section and add the child controls as needed, in my example here I have three text boxes: First Name, Last Name, and Age as you can see below.



I also named the controls in the same order “First Name”, “Last Name”, and “Age”. And yes with the space between “First” and “Name” because this is how I want it to look like in the view.
Then connect the repeating section control to the multiple line field created in the first step.



The Repeating Section JSLink

Now it is the step where the JSLink will do its magic, I have three files deployed to the “Site Assets” library located in the root web in the site collection. (You can choose to upload these files anywhere but remember to change the URLs in the view web part and in the override JavaScript file)

The first file is the “NintexOverrides.js”, and as you can see below I am using the PnP namespaces, and this file mainly is telling SharePoint view that we have another rendering template for one or more fields in the view:


The next file is the “RepeatingSectionTemplate.js”, and I am using the PnP namespace as well. And the purpose of this file simply is to parse the repeating section XML and display HTML table instead:


The third file is “NintexOverrides.css” cascading style sheet to set how we want the table displayed in the view:

 

Deployment

Actually there is no deployment other than copying the three files to the site assets library then set the JS Link property by doing the following steps:

  •  Browse to the view page where you want to apply this rendering (the list where the form with the repeating section is)
  • Edit the web part:




  • Scroll down to “Miscellaneous” then add “~sitecollection/SiteAssets/RepeatingSectionTemplate.js|~sitecollection/SiteAssets/NintexOverrides.js” in the “JS Link” property
  • Click “Okay” then save the page “Stop Editing”

The Output

Now you have the repeating section as follows:


And adding more repeating sections is easy as adding more “Multiple lines of text” column and connect it to the repeating section control on the form, then the output will be something like this:


Then update the “NintexOverrides.js” file to list the new column as follows:


Now the output is like this:



Click here to download the three files mentioned above.

Monday, April 13, 2015

CREATING MASTER-DETAILS RECORDS WITH REPEATING SECTION IN NINTEX FORMS

Please check my second blog post with RDA about "CREATING MASTER-DETAILS RECORDS WITH REPEATING SECTION IN NINTEX FORMS"

Check and give me your feedback: http://www.rdacorp.com/en/Blog/2015/04/09/Creating%20Master-Details%20Records%20with%20Repeating%20Section%20in%20Nintex%20Forms

Thursday, March 12, 2015

ALTERNATE SOLUTION FOR THE ALTERNATE CSS URL IN SHAREPOINT 2013 ONLINE


Today RDA posted my first post on their blog. "ALTERNATE SOLUTION FOR THE ALTERNATE CSS URL IN SHAREPOINT 2013 ONLINE"

Please check and give me your feedback: http://www.rdacorp.com/en/Blog/2015/03/12/Alternate%20Solution%20for%20the%20Alternate%20CSS%20URL%20in%20SharePoint%202013%20Online


Friday, February 27, 2015

Error occurred in deployment step 'Install app for SharePoint': The provided App differs from another App with the same version and product ID

When you try to debug a SharePoint App from Visual Studio you may receive this error: "Error occurred in deployment step 'Install app for SharePoint': The provided App differs from another App with the same version and product ID" which means that your app is still on SharePoint somehow even if you can't see it in the Site Contents page.

To solve the issue you can check one or all of these steps:

  1. Make sure that the App is removed from the site it is installed to. Go to Site Contents and find if it is there in an error state waiting for you to click on "Try again" to be deleted.
  2. Remove the App from the site collection recycle bin if it is there (by default it will stay in the recycle bin for 93 days). This will move it to the Second-Stage recycle bin if you clicked on "Empty Recycle Bin" and will delete it if you selected the app and clicked on "Delete". (in all cases you will only find the App in the site collection recycle bin but the web site created for the App will be in the Second-Stage recycle bin, so every time you remove an App there will be one part in the first recycle bin and another part in the Second-Stage recycle bin, and restoring any of these parts will restore the other part).
  3. Remove the App from the Second-Stage recycle bin.
  4. If you still can't upload your App, repeat step 2 & 3 :)
  5. If after step #4 you can't upload your App, go to the AppManifest.xml and change the Version (or the ProductID if you are still in the development)
You can get more information about Recycle Bin here : https://support.office.com/en-us/article/Manage-the-Recycle-Bin-of-a-SharePoint-Online-site-collection-5fa924ee-16d7-487b-9a0a-021b9062d14b?ui=en-US&rs=en-US&ad=US


Thursday, July 24, 2014

Passed exam 70-486 : Developing ASP.NET MVC Web Applications

I passed exam 70-486: Developing ASP.NET MVC Web Applications two weeks ago, "al 7amd lellah", I am now preparing for Exam 70-487: Developing Windows Azure and Web Services.

ASP.NET Web API - Part 1

Two years ago (Aug 2012), my college Jonathan Kyle and I represented ASP.NET Web API at the ASP.NET Atlanta User Group, then we wrote a blog that never posted, and as I am reading again in the web services and the updates in the Web API I think I can start by posting the blog as the concept  is still the same, then write about the new features.

The first post of the series is written by Jonathan, and here it is:

Introduction:

Everything now became connected together in a way that it became so difficult to say that we have this set of communication languages or communication formats for any conversation including the question or the answer. It is also difficult to let the person you are communicating with just answer your question without adding more details unless you asked him for, and if you need more details do you want it as a text, diagram or a map or whatever? This is why there is always a need for a standard way to communicate, standard way to ask and a standard way to answer, and it is very important to have this communication method very simple to be able to communicate with anyone who has the minimum level or understanding. This is why ASP.NET WEB API is here.


What is ASP.NET Web API

A multi-tier application development platform built on top of the .NET Framework for building and consuming HTTP services that can reach a broad range of clients.  It incorporates the best from WCF Web API and the best from ASP.NET MVC.
.NET and HTTP Services Timeline

Microsoft has arrived at the ASP.NET Web API after several evolutions of web technologies, and applying the lessons learned along the way.

  • 2002: ASP.NET ASMX Services
  • 2006: .NET 3 – WCF Services (SOAP + WS-* Stateful)
  • 2007: .NET 3.5 – WCF WebHttpBinding (first attempt)
  • 2009: WCF - REST Starter Kit (separate package)
  • 2010: .NET 4/WCF - REST Starter Kit + HTTP Services
  • 2012: Merged into ASP.NET MVC Framework called “Web API”


Feature Highlights

  • Modern HTTP programming model: HTTP capable application / client such as a web browser, ajax, or HttpClient.
  • Full support for ASP.NET Routing:  Uses the HTTP method to determine which action is performed by the web application.
  • Content negotiation and custom formatters: Supports automatically converting objects from the server into the data format requested by the client such as JSON and XML.
  • Model binding and validation: Supports automatically converting and validating data from the client into objects on the server.
  • Filters and Query composition: Easily support OData and query syntax.
  • Easy to unit test: Uses MVC pattern makes an application that can have actions tested in isolation from other bits of code.
  • Improved Inversion of Control (IoC) via DependencyResolver: Uses application configuration to automatically find dependent resources for an action.
  • Code-based configuration:  Application can be configured programmatically, not just by application configuration.
  • Flexible Hosting: fully supports Self Host, IIS and Windows Azure.

Why ASP.NET Web API


ASP.NET Web API is the ideal platform for building RESTful application on the .NET Framework.  It is a pattern which enables an application to publish an entity as a Uniform Resource Identifier (URI), typically classified as a Uniform Resource Locator (URL) that is accessible using the HTTP protocol.
The application level protocol (HTTP method) such as GET, PUT, POST, and DELETE specifies the operation that is performed with the entity.  Metadata describing a message is described by the header information built into the HTTP protocol, for example:

  • The body of a message meets the criteria specified in the header such as a description of an entity in a specific format (XML, JSON, etc).
  • Entity contained in the body can be hypermedia (links to other resources)
  • A response message may be a cached response that a proxy server can use as a response without ever passing the request to a server.

ASP.NET Web API uses the elegant MVC infrastructure, allowing the utilization of the HTTP protocol with the minimum amount of coding, and enables the application developer to focus on the business specific application implementation.

Although ASP.NET Web API is an improvement over REST API in WCF by not needing the plumbing complexity, WCF may still be better for messaging and duplex communication, such as using MSMQ or TCP.