Wednesday, June 29, 2016

ASP.NET Core 1.0 dotnet run complie error Cannot find module './wwwroot/dist/vendor-manifest.json


Problem

System.Exception Call to Node module failed with error: Error: Cannot find module './wwwroot/dist/vendor-manifest.json' at Function.Module._resolveFilename

Solution 

Execute webpack --config webpack.config.vendor.js before run application.
This issue addressed to new CLI behaivo

Wednesday, April 27, 2016

SharePoint InfoPath form publishing not working

Hi,

Problem:

You have copied or restored you SharePoint list with custom InfoPath form with items. When you open the list using "Customize in InfoPath" and try to publish back the form you get an error



The SOAP response indicates that an error occurred on the server:

Server was unable to process request. ---> List does not exist.

The page you selected contains a list that does not exist.  It may have been deleted by another user. ---> List does not exist.

The page you selected contains a list that does not exist.  It may have been deleted by another user.



The cause of this problem is that InfoPath form contains you previous or old list GUID in manifest file, that you can not see or find in design mode.

Solution:

1) Open you list setting and copy the list guid from url after parameter "?List=<guild>".
2) Decode a string to a  standard GUID form to get similar string {551C58B1-C361-44B8-9733-07A5CB92D3DA}
3) Replace old list GUID with guid string you have just copied following the steps below using MS InfoPath software:


  1. Click File > Publish > Export Source Files in InfoPath.
  2. Open the Manifest.xsf in NotePad, find all instances of the sharepoint list ID and replace them with the new GUID of the list in the new site. There should be somewhere at the bottom of the file . If you have secondary data connections, update those also.
  3. Save the manifest.xsf file and close. Now right click on the manifest.xsf and select Design to open it back up in InfoPath. 
  4. Click on File > Publish and verify the that the form was published successfully .

Have a good day!!


Friday, April 1, 2016

What that data type of a value is in PowerShell

what that data type of a value is in PowerShell
PowerShell has a comparison operator called –is.  The –is operator simply response 
True or False when you use it to verify the data type of a value.  
The valid data types in PowerShell are:
[string]    Fixed-length string of Unicode characters
[char]      A Unicode 16-bit character
[byte]      An 8-bit unsigned character
[int]       32-bit signed integer
[long]      64-bit signed integer
[bool]      Boolean True/False value
[decimal]   A 128-bit decimal value
[single]    Single-precision 32-bit floating point number
[double]    Double-precision 64-bit floating point number
[DateTime]  Date and Time
[xml]       Xml object
[array]     An array of values
[hashtable] Hashtable object

Below is a script that will use –is to test some values.
$String = "Hello"
$Boolean = $True
$Int = 15

Write-Host "Test for string"
$String -is [String]
$Boolean -is [String]
$Int -is [String]
Test for string True False False
Write-Host "Test for Boolean"
$String -is [Boolean]
$Boolean -is [Boolean]
$Int -is [Boolean]
Test for Boolean False True False
Write-Host "Test for Integer"
$String -is [Int32]
$Boolean -is [Int32]
$Int -is [Int32]​​
Test for Integeк  False False True​

Monday, March 28, 2016

Success stories: Migration to the cloud

Hi all,

Today I have found an interesting article about how Microsoft migrated from SharePoint on-premises to SharePoint online

SharePoint to the cloud: Learn how Microsoft ran its own migration

https://www.microsoft.com/itshowcase/Article/Content/691


Tuesday, January 5, 2016

Office365 Dynamic Distribution Group creation with Multiple Custom Attributes

Dynamic distribution groups are mail-enabled Active Directory group objects that are created to expedite the mass sending of email messages and other information within a Microsoft Exchange organization.
Unlike regular distribution groups that contain a defined set of members, the membership list for dynamic distribution groups is calculated each time a message is sent to the group, based on the filters and conditions that you define. When an email message is sent to a dynamic distribution group, it’s delivered to all recipients in the organization that match the criteria defined for that group.

Use Case

Using Office356 Admin GUI you can create a multiple conditions in custom attribute to filter the AD group objects









Solution
Here you will find a PowerShell script functions code snippet example how to achieve this


 $name - string object your group name

$custom - string object with values separated by semicolon ";" "Test1; Test2; Test2" 

log - is a function for logging messages, you will need to implement it by yourself

function CreateDynamicDistributionGroup($name, $custom)
{
      log("Creating Dynamic distributiongroup " + $name)
      $result = $false;
      $custom = $null
     
    try{
        $results = Get-DynamicDistributionGroup -Identity $name -ErrorAction SilentlyContinue

        if($results -eq $null)
        {
            # Create new DynamicDistributionGroup
            $displayName = $name
            $alias = CreateFriendlyAlias($name)

                  $custom= FormatDynamicPropertyArray($custom)
                  $result = New-DynamicDistributionGroup -Name $name -Alias $alias -IncludedRecipients "MailboxUsers"

            $result = Set-DynamicDistributionGroup -Identity $alias -ManagedBy $appSettings["DefaultDistributionGroupOwner"] -Notes $notes
                  $result = Set-DynamicDistributionGroup -Identity $alias -IncludedRecipients "MailboxUsers" -ConditionalCustomAttribute1 $custom

            $result = $true
        }
        else
        {
            log("DistributionGroup " + $name + " already exist")
        }
    }
    catch [Exception]{
        log("Error creating distributiongroup " + $name + " Technical error: " + $_.Exception.Message)
    }

    return $result
}

function FormatDynamicPropertyArray($value)
{
      $newValueArray = @();

    if($value)
    {
          $values = $value -split ";"

              $values | ForEach-Object{
                        $newValueArray += $_.ToString()
            }
    }

      return $newValueArray

}

Have a good day! :)

Tuesday, October 27, 2015

How to add and set up AngularJS framework for Office365 Outlook Add-in

How to add and set up AngularJS framework to Office365 for Outlook Add-in

Hi,

Today I’ll show you how to add and set up AngularJS for Outlook online in Office365

1.   First, creat App for Office in Visual Studio 2013




2.       Choose  the app type  “Mail”, click “Next” and  



3.   After the project and it’s strucutre was created, open AppCompose folder and add the following folders :
a.       Controller
b.      Service
c.       View



4.       Add the javascript files in newly created folders:
a.       Controller > MyControler.js
b.      Service > MySerice.js
c.       View > MyView.js
d.      Home > angularApp.js

5.       Add the following code snippets to files

angularApp.js
///<reference path="../../Scripts/angular.min.js" />
var myApp = angular.module("myApp", []);

MyControler.js
myApp.controller("myController", function ($scope, myService) {
    var self = $scope;

});

MySerice.js
myApp.service('myService', function ($q, $http) { });

6.   Update the Home.html file with following code in according lines of the file you see in screenshot below:
<html ng-app="myApp">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.js"></script>
<script src="angularApp.js" type="text/javascript"></script>
<script src="../Service/MyService.js" type="text/javascript"></script>
<script src="../Controller/MyController.js" type="text/javascript"></script>
<div id="content-main" data-ng-controller="myController">
<p><strong>Add home screen content here.{{1+2}}</strong></p>



7.       Compile the project by pressing F5 key and enter you developer credentials



8.       Open Outlook App in your Office365
9.       Create new message and click on Add-ins button above. You should see you project in a right navigation panel




10.   If you’ve done  everything right you will see number 3 (Note: Remember we added this line of code {{1+2}}) near text “Add home screen content here”. So AngularJS framework is ready and you can start developing a great applications J



Have a good time, J