Wednesday, February 14, 2018

Sri Lanka SharePoint Forum monthly gathering – February 2018

Title: Office 365 CLI: Managing Office 365 tenant and SharePoint Online

Description: Office 365 CLI is an open-source project driven by the SharePoint Patterns and Practices initiative. Using the Office 365 CLI, developers can manage the different settings of SharePoint and Office 365 no matter if they use Windows, macOS or Linux. In this session we are going to look at some cool features of Office 365 CLI.

Event Url: https://www.facebook.com/events/1880475591994592/

Office 365 CLI - Managing Office 365 tenant and SharePoint Online - Suhail Jamaldeen - Suhail Cloud - SharePoint Forum Sri Lanka

Slides which used for the event.

Clicks during the event

Office 365 CLI Managing Office 365 tenant and SharePoint Online - Suhail Jamaldeeen - Suhail Cloud (6)Office 365 CLI Managing Office 365 tenant and SharePoint Online - Suhail Jamaldeeen - Suhail Cloud (2)

Monday, February 5, 2018

Awarded Microsoft MVP for Office Servers and Services

MVP_Logo_Horizontal_Preferred_Cyan300_CMYK_300ppi

All the praises belong to Almighty

Today I'm honored to be a new member of the Microsoft MVP community for Office Servers and Services.

I would like to thank our mentor Prabath Fonseka for guiding me throughout my professional career, Dinusha Kumarasiri for nominating me and guiding me.

In addition, I would like to thank Wellington Perera, Upul Weerasinghe, Sachira Chinthana Jayasanka and Fiqri Ismail for the support and encouragement which they have given me.

Also I would like to thank Hibathul Careem sir, my family, friends who are with me always.


Sunday, January 21, 2018

Trigger a Microsoft flow only when a SharePoint list item is modified – An alternative approach

Introduction

One of my friend asked me whether there is a Microsoft flow action to trigger the flow only when a SharePoint Online list item is modified. Unfortunately there is no out of the box trigger available.

Solution

We can overcome this by adding a condition at the beginning of the flow - we have to check whether the created date time and modified date time are not equal. So the flow will execute only if the created time and modified time is not equal.

Please check the below screenshot for the reference.

Suhail Cloud - January 2018



Tuesday, January 9, 2018

Invoke a code activity (Native Activity) and retrieve the results using code – Workflow Foundation 4.5

Introduction

We can create code activity as a part of workflow solutions using workflow foundation 4.5. In this post I will show how we can create a native code activity and access the results in asp.net controller. Native code activity

 

   //The string mentioned in NativeActivity is the resut type.  

     public sealed class MySampleNativeCode : NativeActivity     {

         // Define an activity input argument of type string

         public InArgument Name { get; set; }



         protected override void Execute(NativeActivityContext context)

         {

             var name = context.GetValue(Name);

             //Here we set the string value to the Result property in NativeCode

             context.SetValue(base.Result, "Hello from Native Code Activity " + name);



         }

     }
Invoke the code activity The code activity is invoked in asp.net web api controller.
 
 // GET: api/CustomerRegistration

         public string Get()

         {

             //Create a instance of the native code

             Activity wf = new MySampleNativeCode();



             //Define the input argumentes

             Dictionary arguments = new Dictionary();

             arguments.Add("Name", "Suhail");



             //Invoke the workflow

             IDictionary outputs = WorkflowInvoker.Invoke(wf, arguments);



             //Get the output value and assign to return string

             var returnString = outputs["Result"].ToString();



             return returnString;

         }

Conclusion

You can see the value in “returnString” which is returned from Native Code Activity.



Saturday, January 6, 2018

Cannot add .Net Standard 2.0 Class as .Net Type in Workflow Foundation Activity Designer projects in Visual Studio 2017

Introduction

I was working on Workflow Foundation 4.5 using Activity Designer Library template in Visual Studio 2017.

Problem Background

When I try to add a class library as input Type through Type Browser in Activity designer it shows an error as “The selected type could not be created” as shown in the image below.

clip_image001

I compared another machine with the latest update of Visual Studio which was working fine. The problem seems to be I didn’t have .Net framework 4.6.2 SDK and .Net framework 4.7 SDK installed.

clip_image003

Solution

I modified the Visual Studio as below using Visual Studio Installer.

clip_image005

Conclusion

You will can refer .Net Standard 2.0 projects and dlls in workflow foundation project templates and use without any issue.