Tuesday, 28 July 2015
Update field length/name/property causes SQL timeout
Thursday, 23 July 2015
Creating document library to site using powershell script
Creating document library to site using powershell script
[CmdletBinding()]
param ([Parameter(Mandatory=$true)] $SPSiteURL)
$ErrorActionPreference = "Stop"
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
function CreateSharePointFolder(
[Parameter(Mandatory=$true)] $SPWeb,
[Parameter(Mandatory=$true)] $ListTemplate,
[Parameter(Mandatory=$true)] $FolderName,
[Parameter(Mandatory=$true)] $Title,
[Parameter(Mandatory=$true)] $Description
)
{
$Folder = $spWeb.Lists.TryGetList($Title)
if($Folder -eq $NULL){
write-host "Creating new Document Library $Title"
$listId = $spWeb.Lists.Add($FolderName,$Description,$listTemplate)
$newList = $spWeb.Lists[$listId]
$newList.Title = $Title
$newList.OnQuickLaunch = "true"
$newList.Update()
}else
{
write-host "$Title already exists"
}
}
$spWeb = Get-SPWeb -Identity $SPSiteURL #http://splocal.ntlm
$listTemplate = [Microsoft.SharePoint.SPListTemplateType]::DocumentLibrary
CreateSharePointFolder -ListTemplate $listTemplate -FolderName "prefix_entityname1" -Title "Entity Display Name1" -Description "Entity description" -SPWeb $spWeb
CreateSharePointFolder -ListTemplate $listTemplate -FolderName "prefix_entityname2" -Title "Entity Display Name2" -Description "Entity description" -SPWeb $spWeb
[CmdletBinding()]
param ([Parameter(Mandatory=$true)] $SPSiteURL)
$ErrorActionPreference = "Stop"
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
function CreateSharePointFolder(
[Parameter(Mandatory=$true)] $SPWeb,
[Parameter(Mandatory=$true)] $ListTemplate,
[Parameter(Mandatory=$true)] $FolderName,
[Parameter(Mandatory=$true)] $Title,
[Parameter(Mandatory=$true)] $Description
)
{
$Folder = $spWeb.Lists.TryGetList($Title)
if($Folder -eq $NULL){
write-host "Creating new Document Library $Title"
$listId = $spWeb.Lists.Add($FolderName,$Description,$listTemplate)
$newList = $spWeb.Lists[$listId]
$newList.Title = $Title
$newList.OnQuickLaunch = "true"
$newList.Update()
}else
{
write-host "$Title already exists"
}
}
$spWeb = Get-SPWeb -Identity $SPSiteURL #http://splocal.ntlm
$listTemplate = [Microsoft.SharePoint.SPListTemplateType]::DocumentLibrary
CreateSharePointFolder -ListTemplate $listTemplate -FolderName "prefix_entityname1" -Title "Entity Display Name1" -Description "Entity description" -SPWeb $spWeb
CreateSharePointFolder -ListTemplate $listTemplate -FolderName "prefix_entityname2" -Title "Entity Display Name2" -Description "Entity description" -SPWeb $spWeb
Monday, 20 July 2015
sharepoint keeps asking for credentials when opening documents
Thursday, 16 July 2015
The document records could not be loaded from SharePoint. Try refreshing the grid. If the problem persists, contact your system administrator
One of the project where we were using sharepoint and crm 2011 integration, user was able to see crm list component fine but when he/she tries to upload a document and then try to refresh the grid (using refresh icon on the list component), the document already present where no longer shown and also the whole grids gone blank with following error message
The document records could not be loaded from SharePoint. Try refreshing the grid. If the problem persists, contact your system administrator"
Solution: Make sure
1. User has got the site contributor permission (in this case user had)
2. Execute latest related crm 2011 sharepoint list component (in this case we already done this)
3. Upload the lastest related crm 2011 sharepoint list component solution file having extension of wsp (this was the error, as we were thinking we had the same version but that wasn't the case), we can check this by downloading the uploaded solution wsp file from sharepoint and then compare it with the latest one ( i normally use beyound compare for this) but normally if there is a differnt you would tell normally by just looking at the file size.
https://community.dynamics.com/crm/f/117/t/141177
The document records could not be loaded from SharePoint. Try refreshing the grid. If the problem persists, contact your system administrator"
Solution: Make sure
1. User has got the site contributor permission (in this case user had)
2. Execute latest related crm 2011 sharepoint list component (in this case we already done this)
3. Upload the lastest related crm 2011 sharepoint list component solution file having extension of wsp (this was the error, as we were thinking we had the same version but that wasn't the case), we can check this by downloading the uploaded solution wsp file from sharepoint and then compare it with the latest one ( i normally use beyound compare for this) but normally if there is a differnt you would tell normally by just looking at the file size.
https://community.dynamics.com/crm/f/117/t/141177
Wednesday, 1 July 2015
Monday, 29 June 2015
internet explorer options are disable by network policies enforced
when I try to add a url to trusted sites the page is disabled and I am not able to do so, in order to enable this go to run and write regedit and go to following path and delete the "Internet Settings" sub nodes, and then close and restart internet explorer.
HKLM\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings
Thursday, 7 May 2015
Shrink Database - SQL JOB that runs every mornign
1. Open "Microsoft SQL Server Management Studio" MSSMS
2 Connect to server
3. In Object explorer expand
I. Server Instance
II. SQL Server Agent
III. Jobs
4. Right click on Jobs folder and click on "New Job..." and provider following information
I. In General Tab
a. Name (e.g. Shrink Database)
b. Description (e.g. Currntly having issue with disk space, setting up the job so that it runs every morning and I don't have to restart box or run sql manually)
II. In Steps Tab
a. Click New button
1. In General Tab
I. Step name (e.g. SHRINK DATABASE)
II. Command (e.g. EXEC sp_MSForEachDB 'DBCC SHRINKDATABASE ("?",0)' )
2. Advanced Tab
I. Run as user (e.g. xyz\kaleemkhan)
III. In Schedules Tab
a. Name (e.g. Run every morning)
b. Schedule Type (e.g. Recurring)
c. Enable: yes
d. Frequency: Daily
e. Recurs: 1 day(s)
f. Occurs once at 08:00:00
g. Start date (e.g. creation date)
Click Okay to opened windows to setup the SQL job.
2 Connect to server
3. In Object explorer expand
I. Server Instance
II. SQL Server Agent
III. Jobs
4. Right click on Jobs folder and click on "New Job..." and provider following information
I. In General Tab
a. Name (e.g. Shrink Database)
b. Description (e.g. Currntly having issue with disk space, setting up the job so that it runs every morning and I don't have to restart box or run sql manually)
II. In Steps Tab
a. Click New button
1. In General Tab
I. Step name (e.g. SHRINK DATABASE)
II. Command (e.g. EXEC sp_MSForEachDB 'DBCC SHRINKDATABASE ("?",0)' )
2. Advanced Tab
I. Run as user (e.g. xyz\kaleemkhan)
III. In Schedules Tab
a. Name (e.g. Run every morning)
b. Schedule Type (e.g. Recurring)
c. Enable: yes
d. Frequency: Daily
e. Recurs: 1 day(s)
f. Occurs once at 08:00:00
g. Start date (e.g. creation date)
Click Okay to opened windows to setup the SQL job.
Subscribe to:
Posts (Atom)