Register your Bot with Bot Framework

Registration of custom bot with the Bot directory is a simple process which can achieved by following through the link Register new bot.

Even it is simple there are few tips you can find out and something new to notice which describes as below.

Bot Handle?

This will be the wording which will used to create bot end point with your bot application. If I use bot handle as “TechCentro” generated embeded URi will be “https://webchat.botframework.com/embed/TechCentro”. This could contain only alphanumeric characters and underscore only.

Messaging end point?

After you hosted your bot application you will exposed the URL of  messaging endpoint, or in simple terms it will be route URL to your bot.

If you go with bot framework “Bot Application” template, it will be URL of web app plus “/api/messages”.

Eg. https://botappapi.azurewebsites.net/api/messages

Note: You must need to configured HTTPS and HTTP wont help you to proceed in the process.

Microsoft App ID?

This will generate by the bot registration application for you. You just need to tap on “Create Microsoft App ID and Password” then you will be redirected to App ID and password generation site.

Generated password will important keep in backup in a secure place since you wont be able to get it in future after your bot is created.

Advertisements

In memory of Office SharePoint Server 2007 aka MOSS

Naturally we all expect end on everything, same applies to software in this days. Hopefully we could not see SharePoint 2007 living with us for ten years as for now after 10th October 2017, in a way This is with the good hope on modernize and evolve with the collaboration but in a way bad news for whom love classics.

What happens after deprecation?

  • No security update further
    • This will get managing this costly
    • No patches No hot fixes from Microsoft
  • No support
    • Need to migrate to version with life as sooner
    • Not guaranteed Office365 and cloud support
  • No technical content management
    • Less documentations and resources
    • Less community engagement

Key milestones to say good bye!


“Say good bye and make your modernization plans switched on”

Improved LOOK to Office365

Since this is quick update on the Microsoft Office team and no influence on the functionality aspect, thought of make post ultra summarized. Older Office365 started rolling out in December and will continue through early 2017. Quick view will be enhanced in the home page of yours login as below.

There is a change on your apps on the cloud but more or less this is a UX (user experience) side improvements which makes Office user happy.

You can create new documents and also view latest modified documents at a glance on the home page. Documents will be simply quick preview of your OneDrive.

Your start page as can be selected on your preference with tapping on the “Settings Gear” which appears on the top right corner.

References

https://blogs.office.com/2016/12/28/the-new-office-com-gets-first-major-update/

REST and OData with Office365 APIs

When communicate with Office or SharePoint APIs, its important fact that knowledge on representational transfer protocol and OData protocols while moving with deep customization’s.

what is REST (Representational State Transfer)?

In simple terms REST is all about below;

  • Predefined set of stateless operation which identified by URL
  • Responses may contain HTML, JSON, XML or any other defined format which supported
  • GET, POST, PUT, DELETE are most common forms of HTTP verbs

rest_api

Eg.

GET:
http:///_api/web/lists/GetByTitle('Test')
GET:
https://outlook.office.com/api/v2.0/me/MailFolders/sentitems/messages/

what is OData (Open Data Protocol)?

  • Equipped with query and creational capabilities on REST APIs
  • Initiated by Microsoft in year 2007
  • Format [http or https]://<REST Endpoint URL>/<query>
http://<end point URI>?$select=value&$filter=condition$orderby=value

Open Standardization?
Standards which are developed with the involvement of community (mostly with developers). Open standards inherited to office 365 API development in following manners;
• Most of Office 365 APIs are exposed as a RESTful APIs
• Its implemented with OData 4.0 (as for year 2016)

OData queries?
OData queries is common standard which elaborated above also included in the SharePoint and Office365 end point data querying. Its ultra simple if you know the basics and played with this. Follow the following links and be expert on this.

www.odata.org : Official site for OData

graph.microsoft.io : Explore Microsoft Office365 API with queries

OData validator to validate your REST endpoints

Note : If you noticed there are versions associated with most of cloud based endpoints. Cloud services are continuously pushing changes to its services as sooner changes are ready, so then returned patterns may changed for same query. To avoid custom applications get break due to changed on endpoint, it classifies under version metadata. Simply you can pick any version which satisfies your requirement.

Querying SharePoint Endpoints as below;

SharePoint REST service query option syntax
Courtesy : msdn.microsoft.com

 

Further references 

Clear | Remove | Delete Managed metadata (Taxanomy) column value in SharePoint List/ library

You may find many references to write into taxonomy columns (aka. managed metadata columns) but the clearing those is pretty much tricky.

Following code sample guide you through how you can clear the taxonomy column value in you custom client side application (JSOM) based on SharePoint.

//USAGE:
//clearWithValue =true => for clear saved taxanomy column values
//clearWithValue =false => wite into taxanomy column 

function saveValuesToManagedMetadataColumns(listName, fieldId, taxanomyLabel, siteUrl, clearWithValue) {

    //You many need seperate function to resolve GUID for the lable.
//Its based on your requirement and for now its hardcoded
    var taxonmyGuid = "9f75f519-51f8-4723-9182-7e8225a54031";
//Loading context and list
    var context = new SP.ClientContext(siteUrl);
    var list = context.get_web().get_lists().getByTitle(listName);
    //Getting item to update
    var camlQuery = new SP.CamlQuery();
    camlQuery.set_viewXml("<View>" +
        "<Query>" +
        "<Where><Eq>" +
        "<FieldRef Name=\'ID\'/>" +
        "<Value Type=\'Number\'>" + fieldId + "</Value>" +
        "</Eq></Where>" +
        "</Query>" +
        "</View>");
    var items = list.getItems(camlQuery);
//Load selected items to context
    context.load(items);
    //Loading MMS field
    var field = list.get_fields().getByInternalNameOrTitle("taxanomyColumnName");
    var txField = context.castTo(field, SP.Taxonomy.TaxonomyField);
//Load field to context
    context.load(txField);

    context.executeQueryAsync(function () {
        //getting term set ID
        var functionTermSetId = txField.get_termSetId().toString();
        //Term value build for update..this is not useful is your purpose only for clearing
//But for illustration..got below also to show off
        var termValue = new SP.Taxonomy.TaxonomyFieldValue();
        termValue.set_label(taxanomyLabel);
        termValue.set_termGuid(taxonmyGuid);
        termValue.set_wssId(-1);
//Iterate through collection and update
        var e = items.getEnumerator();
        while (e.moveNext()) {
            var item = e.get_current();

            //Save to taxanomy column
            if (clearWithValue == false)
                txField.setFieldValueByValue(item, termValue);

            //Clering taxanomy column
            if (clearWithValue == true)
                txField.validateSetValue(item, null);

            //Set noraml fields..If you have them too
            item.set_item('Title', metadataCollection.Title);

            item.update();
        }
        context.executeQueryAsync(function (sender, args) {
            console.log('Successfully updated item with ', args, serviceId, false);
        }, function (args) {
            console.log('Error on updating item with taxanomy value', args, serviceId, false);
        });

    }, function (args) {
        console.log('Internal server Error on updating item with taxanomy metadata', args, serviceId, false);
    });

}

References
http://sharepoint.stackexchange.com/questions/47719/how-can-i-set-empty-value-to-taxonomyfield-of-microsoft-sharepoint-client-taxono

Tips and Hints on Angular 2 Modules Usage

What is Angular 2 module?

"Simply it's like a box which encapsulates angular components"

import { NgModule } from '@angular/core';

@NgModule({})
  • Class which decorated with NgModule
  • Arrange code in modular way
  • Extend our application with external modules

Some useful tips as below; 

Tip #1

Every application must bootstrap one component, which known as “root application component”.

bootstrap: [
AppComponent
]

Tip #2

Every components, directives and pipes must only belong to only one Angular module.

Because we follow singleton design pattern.

Tip #3

Only declare components, directives and pipes under declarations array.

declarations: [
AppComponent
, AppFilterPipe
, AppDirective
]

Tip #4

Never re-declare modules belongs to another module, because if we do so we polluting core objective of Angular modules.

Tip #5

All declared components are private by default and only accessible to current module unless explicitly export them.

Tip #6

To consume directives within template, you must declare directive within the module or imported from external module.

Tip #7

Export/ Re-export components, directives & pipes when ever who need, means that you are not restrict on that.

Tip #8

No need of any imports to export our components, directives and pipes.

Tip #9

Never export services and declare those within providers array, since then its shared within all module.

providers: [AppGuard]

Tip #10

Imported components, directives, pipes (it can be Angualar or 3rd party) makes available any exported module consumable within our module.

import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';

@NgModule({
//external component imports,
imports: [
BrowserModule
, FormsModule
}
})

Tip #11

Importing module does not mean that you have access to its imported modules. Simply imports are not inherited!

Tip #12

Avoid declaring services of shared modules in providers array since we must ensure modules not imported my times in the app.

Tip #13

Route guards must be declared within providers since navigation control is applicable to app level.