Thursday, January 21, 2016

Installing Sharepoint prerequisits with powershell

Import-Module ServerManager

Copy-Item -Path "$($ENV:SystemRoot)\System32\ServerManager.exe" `
    -Destination "$($ENV:SystemRoot)\System32\ServerManagerCmd.exe" -Force

Add-WindowsFeature NET-WCF-HTTP-Activation45,NET-WCF-TCP-Activation45,NET-WCF-Pipe-Activation45

Add-WindowsFeature Net-Framework-Features,Web-Server,Web-WebServer, `
    Web-Common-Http,Web-Static-Content,Web-Default-Doc,Web-Dir-Browsing, `
    Web-Http-Errors,Web-App-Dev,Web-Asp-Net,Web-Net-Ext,Web-ISAPI-Ext, `
    Web-ISAPI-Filter,Web-Health,Web-Http-Logging,Web-Log-Libraries,Web-Request-Monitor, `
    Web-Http-Tracing,Web-Security,Web-Basic-Auth,Web-Windows-Auth,Web-Filtering, `
    Web-Digest-Auth,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression, `
    Web-Mgmt-Tools,Web-Mgmt-Console,Web-Mgmt-Compat,Web-Metabase,Application-Server, `
    AS-Web-Support,AS-TCP-Port-Sharing,AS-WAS-Support, AS-HTTP-Activation, `
    AS-TCP-Activation,AS-Named-Pipes,AS-Net-Framework,WAS,WAS-Process-Model, `
    WAS-NET-Environment,WAS-Config-APIs,Web-Lgcy-Scripting,Windows-Identity-Foundation, `
    Server-Media-Foundation,Xps-Viewer

Restart-Computer

Import-Module ServerManager
 
Copy-Item -Path "$($ENV:SystemRoot)\System32\ServerManager.exe" `
    -Destination "$($ENV:SystemRoot)\System32\ServerManagerCmd.exe" -Force
 
Add-WindowsFeature NET-WCF-HTTP-Activation45,NET-WCF-TCP-Activation45,NET-WCF-Pipe-Activation45
 
Add-WindowsFeature Net-Framework-Features,Web-Server,Web-WebServer, `
    Web-Common-Http,Web-Static-Content,Web-Default-Doc,Web-Dir-Browsing, `
    Web-Http-Errors,Web-App-Dev,Web-Asp-Net,Web-Net-Ext,Web-ISAPI-Ext, `
    Web-ISAPI-Filter,Web-Health,Web-Http-Logging,Web-Log-Libraries,Web-Request-Monitor, `
    Web-Http-Tracing,Web-Security,Web-Basic-Auth,Web-Windows-Auth,Web-Filtering, `
    Web-Digest-Auth,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression, `
    Web-Mgmt-Tools,Web-Mgmt-Console,Web-Mgmt-Compat,Web-Metabase,Application-Server, `
    AS-Web-Support,AS-TCP-Port-Sharing,AS-WAS-Support, AS-HTTP-Activation, `
    AS-TCP-Activation,AS-Named-Pipes,AS-Net-Framework,WAS,WAS-Process-Model, `
    WAS-NET-Environment,WAS-Config-APIs,Web-Lgcy-Scripting,Windows-Identity-Foundation, `
    Server-Media-Foundation,Xps-Viewer
 
Restart-Computer
- See more at: http://www.someshinyobject.com/posts/server-2012-r2-and-sharepoint-2013-the-tool-was-unable-to-install-application-server-role-web#sthash.GUyPViJ3.dpuf
Import-Module ServerManager
 
Copy-Item -Path "$($ENV:SystemRoot)\System32\ServerManager.exe" `
    -Destination "$($ENV:SystemRoot)\System32\ServerManagerCmd.exe" -Force
 
Add-WindowsFeature NET-WCF-HTTP-Activation45,NET-WCF-TCP-Activation45,NET-WCF-Pipe-Activation45
 
Add-WindowsFeature Net-Framework-Features,Web-Server,Web-WebServer, `
    Web-Common-Http,Web-Static-Content,Web-Default-Doc,Web-Dir-Browsing, `
    Web-Http-Errors,Web-App-Dev,Web-Asp-Net,Web-Net-Ext,Web-ISAPI-Ext, `
    Web-ISAPI-Filter,Web-Health,Web-Http-Logging,Web-Log-Libraries,Web-Request-Monitor, `
    Web-Http-Tracing,Web-Security,Web-Basic-Auth,Web-Windows-Auth,Web-Filtering, `
    Web-Digest-Auth,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression, `
    Web-Mgmt-Tools,Web-Mgmt-Console,Web-Mgmt-Compat,Web-Metabase,Application-Server, `
    AS-Web-Support,AS-TCP-Port-Sharing,AS-WAS-Support, AS-HTTP-Activation, `
    AS-TCP-Activation,AS-Named-Pipes,AS-Net-Framework,WAS,WAS-Process-Model, `
    WAS-NET-Environment,WAS-Config-APIs,Web-Lgcy-Scripting,Windows-Identity-Foundation, `
    Server-Media-Foundation,Xps-Viewer
 
Restart-Computer
- See more at: http://www.someshinyobject.com/posts/server-2012-r2-and-sharepoint-2013-the-tool-was-unable-to-install-application-server-role-web#sthash.GUyPViJ3.dpuf

Tuesday, February 17, 2015

Using jQuery to prevent hover drop-down global navigation in SP 2010

Just below line #34, I am going to add some code:

 <SharePoint:SPHelpPageComponent Visible="false" runat="server"/>

<script src="/Style%20Library/jquery-1.6.min.js" type="text/javascript"></script>

<script type="text/javascript">
$(document).ready(function () {
$(".menu-horizontal ul li.dynamic-children").css("cursor", "pointer");
$(".menu-horizontal ul.static li.static.dynamic-children").hover(
function() {
$(this).children(":first").next("ul.dynamic").hide();
});
$(".menu-horizontal ul li.dynamic-children").click(
function() {
$("ul.dynamic").show();
});
});
</script>

Tuesday, January 20, 2015

Create a SharePoint site using REST in workflow with SharePoint Designer

https://rogereriksen.wordpress.com/2013/05/24/create-a-sharepoint-site-using-rest-in-workflow-with-sharepoint-designer/

Wednesday, December 10, 2014

Check Box Data Retrieve AngularJS

function getCashAdvanceSelectors(selected) {
            datacontext.getCashAdvanceChoices()
              .then(function (data) {
                  var arr = [];
                  data.forEach(function (entry) {
                      var ok = false;
                      if (selected != null && selected.indexOf(',') > -1) {
                          selected.split(',').forEach(function (item) {
                              if (entry == item) {
                                  ok = true;
                              }
                          });
                      } else if (selected != null) {
                          if (entry == selected) {
                              ok = true;
                          }
                      }
                      var obj = {
                          name: entry,
                          selected: ok
                      };
                      arr.push(obj)
                  });

                  vm.CAItems = arr;
              });
        }

Tuesday, December 9, 2014

Check Box Data POST AngularJS

function getCashAdvanceSelectors() {
            datacontext.getCashAdvanceChoices()
              .then(function (data) {
                  //vm.CAItems = data;
                  var arr = [];
                  data.forEach(function (entry) {
                      var obj = {
                          name: entry,
                          selected: false
                      };
                      arr.push(obj)
                  });

                  vm.CAItems = arr;
              });
        }

Thursday, November 13, 2014

Retrieve Author / Lookup Fields from Sharepoint Lists


 Reference :

How about a simple query:
 /_api/web/lists/getbytitle('<list title>')/items(<item id>)
which will return all the field values for a list item with some limitation for User/Lookup fields:
  • only lookup id values will be retrieved.
In order to request all the field values including User/Lookup field values, you could specify * to select all the fields plus to specify projected fields explicitly:

/_api/web/lists/getbytitle('<list title>')/items(<item id>)?$select=<projected field>/Id,<projected field>/Title,*&$expand=<projected field>

For exampe; in order to request all the field values including projected fields (like Author and Editor user fields) the following query could be used:

/_api/web/lists/getbytitle('<list title>')/items(<item id>)?$select=Author/Id,Author/Title,Editor/Id,Editor/Title,*&$expand=Author,Editor




.js file

 function getIssueTrackerPartials()
    {
       
            var deferred = $q.defer();

            $http({
                method: 'GET',
                url: '_api/web/lists/getbytitle(\'Issue Tracker\')/items?$select=Id,Title,IssueDescription,IssueStatus,Severity,Modified,Created,DepartmentAD,Author/Title&$expand=Author&$orderby=Title'
            }).success(function (data) {
                common.logger.log("retrieved LP partials via ngHttp", data, serviceId);
                deferred.resolve(data.d.results);
            }).error(function (error) {
                var message = "data context ngHttp error: " + error.message;
                common.logger.logError(message, error, serviceId);
                deferred.reject(error);
            });

            return deferred.promise;
    }

.HTML

<td class="ms-cellstyle ms-vb2">
                    <div class="ms-rtestate-field" data-ng-click="vm.gotoItem(lp)">{{lp.Author.Title}}</div>
                </td>