Disable Form Field by using jQuery

Problem Description:

Usually you disable fields on forms by using SP Designer.
But if it’s a site content type, you can’t do it this way –> use a piece of Javascript

Resolution:

1. Download a jqueryxx.min.js file and place it in e.g. Site Assets library.

2. On the list settings choose the form web part you want to manipulate.
Then add a script web part and add following code (the correct title of the field you may find by inspect the element in the browser).

<script src=”http://PathToYourjQueryFile/jquery-xx.min.js” type=”text/javascript”></script>
<script type=”text/javascript”>
$(document).ready(function()
{
$(“input[Title=’YourFieldTitle’]”).attr(“disabled”, “disabled”);
});
</script>

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

SOLD – CZ 75 SP01 Shadow Line (9mm Luger)

€ 800,-

Die Waffe ist neuwertig, ca. 1000 Schuss wurden damit erst gemacht.
Gekauft wurde die Waffe im Juli 2017 (Rechnung liegt bei, also noch volle Hersteller-Garantie).
Sehr hochwertige Waffe zu einem günstigen Preis, die CZ Modelle sind bei Sportschützen sehr beliebt und sehr günstig. Die Shadow Line hat bereits einige Modifikationen gegenüber dem Standardmodell (verbesserte Maganzineinführung, Abzug überarbeitet,..)
Gewicht: 1000 g
2 Stk. 14-Schuss Magazine
Die Waffe gehört meiner Partnerin und wird verkauft, weil sie lieber mit meiner X-Six schiesst. Nun wurde sie quasi überflüssig und da verwenden wir den Platz dann doch lieber für einen schönen Revolver.

Die Waffe liegt in Kommission (Privatverkauf) bei Waffen Keckeis in Bludenz (Austria / Vorarlberg) und kann dort zu den normalen Geschäftszeiten besichtigt bzw. gekauft werden.

Timeouts when creating new service application on SharePoint

Problem Description:

Error: “Timeout Expired. The timeout period elapsed prior to completion of the operation or the
server is not responding.​”

This can be caused due too many rows in the SharePoint_Config DB in table dbo.TimerJobHistory

You can check on SQL with the following code:

SELECT CONVERT(bigint, rows)
FROM sysindexes
WHERE id = OBJECT_ID(‘dbo.TimerJobHistory’)
AND indid < 2

The root problem is a general SP 2013 “beature”.
The job “Delete Job History” is scheduled weekly but has a timeout. That causes, that ususally a lower number of entries is purged after a week than new entries created during the week on a large farm.

Resolution:

​Set the job schedule to 1 minute until you reached a lower and stable number of rows.
After that change the job to run daily.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Removing all broken inhertiance and permissions complete site collection

Problem Description:

if you need to remove all permissions and broken inheritances from a complete site collection, you may run this script​

Resolution:

Add-PSSnapin Microsoft.SharePoint.PowerShell
$site = Get-SPSite https://URL
$webs = $site.AllWebs
foreach ($web in $webs){
if ( ($web.HasUniqueRoleAssignments) -and ($web.IsRootWeb -eq $false ) ){
$web.ResetRoleInheritance()}
Write-Host “Removed broken inheritance on web: ” $web.Url -ForegroundColor Red
}

$lists=$web.Lists
foreach ($list in $lists){
if (($list -ne $null) -and ($list.HasUniqueRoleAssignments)){
$list.ResetRoleInheritance()
Write-Host “Removed broken inheritance on list: ” $list.Title -ForegroundColor Blue
Clear-Variable list
}

Write-Host “Entering list to remove single item permission: ” $list.Title
$items = $list.items | Where {$_.HasUniqueRoleAssignments}
foreach ($item in $items){
$item.ResetRoleInheritance()
Write-Host “Removed broken inheritance on item: ” $item.Name -ForegroundColor Green
Clear-Variable item
}}
$web.Dispose()
}

Remove all permissions
$groups = $web.SiteGroups
for ($i=0;$i -le $groups.Count;$i++){
$web.SiteGroups.Remove($groups[$i])
}
$users = Get-SPUser -Web $web -Limit all
for ($i=0;$i -le $users.Count;$i++){
Remove-SPUser -Web $web -Identity $users[$i] -Confirm:$false
}

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...