Posts

Showing posts from February, 2017

Change Language for current user with JSOM in SharePoint Online

Hi, Here is code which can change language for current user with JSOM : <script type="text/javascript" charset="utf8" src="/sites/BizDev/Style%20Library/SPS/jquery-1.11.3.min.js"></script> <select id='LangSelect' onchange="SetUserLanguage(this.value);"></select> <script type="text/javascript"> function SetUserLanguage(lCode) {     var call = $.ajax({             url: _spPageContextInfo.siteAbsoluteUrl + "/_api/Web/Lists/GetByTitle('Languages')/items?" + "$select=Title,Code,LCode,ID&$top=5000&$filter=Code eq "+lCode,             type: "GET",             dataType: "json",             headers: {                 Accept: "application/json;odata=verb...

Change Site Language with JSOM

Hi, Here is code which can change site language with JSOM : <script type="text/javascript" charset="utf8" src="/Style%20Library/SPS/jquery-1.11.3.min.js"></script> <select id='LangSelect' onchange="SetLanguage();"></select> <script type="text/javascript"> $( document ).ready(function() {     LoadLanguages();     setTimeout(GetUpdatedLangulage, 2000); }); function LoadLanguages() {         var call = $.ajax({             url: _spPageContextInfo.siteAbsoluteUrl + "/_api/Web/Lists/GetByTitle('Languages')/items?" + "$select=Title,Code,ID&$top=5000",             type: "GET",             dataType: "json",             headers: {         ...

Remove App from SharePoint Online with Powershell

Hi, Today I was facing some issues in installed custom app. I was not able to get App Details & also not able to remove the app. I tried alot from interface but I couldn't remove the app. Then I move to Powershell scripts. Here is the powershell script which can remove the app from SharePoint Online. Only prerequisite is you must have SharePoint Online Client Components SDK installed on the system. cls [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client") [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime") Function Get-ClientContext([string]$Url,[string]$UserName,[string]$Password) {     $context = New-Object Microsoft.SharePoint.Client.ClientContext($Url)     $context.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($UserName, $Password)     return $context } Function Uninstall-AppInstance([Microsoft.SharePoint.Client.ClientContext]$Context,[...