Posts by fredericdietrich
Search Cannot Crawl Start Address
Sharepoint Search The Start Address Cannot Be Crawled
even read permissions are good, search cannot crawl, i triied a lot of things found on the net, no one succeded. then i only add a new web application, and start a full crawl. the crawl succeded on each start adress, i don't know why but it works :)
PSONFIG.exe Product Failed
PSCONFIG.exe Configuration of SharePoint Products failed. Configuration must be performed before you use SharePoint Products. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible
An exception of type System.Data.SqlClient.SqlException was thrown. Additional exception information: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Sharepoint Query Search By UTC Date
var aDate = new Date('2019-12-12);
var offset = new Date().getTimezoneOffset();
console.log("offset : " + offset);//in my case, offset is -60
console.dir(aDate);
aDate.setMinutes(aDate.getMinutes() + offset);
console.dir(aDate);
/_api/search/query='MnpDate:aDate.toISOString()';
// aDate : 2019-12-11T23:00:00.0000000Z
Sharepoint REST set ShowInEditForm
Sharepoint Query Using REST
Here is my page to develop my REST queries
if my query returns an object, it will display all properties of my obj, as in navigation console (console.dir(obj);)
if my query returns an array it will display all properties in input : "show properties'
complete code to add in a script editor webpart :see script
queries samples :
/_api/web/lists(guid'0E12917B-80F9-4765-8612-22A9AB467123')/items?$select=AssignedTo,Title&$orderby=DueDate desc&$filter=RelaunchDate eq null and Status eq 'In Progress'
/_api/web/getlist('/sites/csc-dev/Lists/myLMist')/fields?$select=Group,InternalName,Title,TypeAsString,Hidden
/_api/web/getlist('/sites/csc-dev/Lists/vdfdfvf')/fields?$select=Group,InternalName,Title,TypeAsString,Hidden&$filter=Hidden eq false and TypeAsString ne 'Computed' and startswith(InternalName, '_') eq false&$orderby=TypeAsString
/_api/web/getlist('/sites/csc-dev/Lists/myLMist')/fields?$select=Group,InternalName,Title,TypeAsString,Hidden
/_api/web/lists(guid'0E12917B-80F9-4765-8612-22A9AB46784E')/items?$select=AssignedTo/EMail,Created,Author/EMail,Body,DueDate,,ID,IsGroup,Modified,Editor/EMail,StartDate,Status,stepName,TaskGroup/EMail,TaskIdentifier,TaskProcessed,TaskProcessedBy/Title,TaskProcessedBy/Id,TaskProcessedBy/EMail,Title,WFFormFieldStepType,WFInstance&$orderby=DueDate desc&$filter=RelaunchDate eq null and Status eq 'In Progress'&$expand=Author,Editor,AssignedTo,TaskProcessedBy,TaskGroup
USER
{
Title: string;
EMail: string;
Id: number;
}
Sharepoint Query Search With REST
using REST to query sharepoint
CSOM powershell SSL TSL site
Exception calling "ExecuteQuery" with "0" argument(s): "The request was aborted: Could not create SSL/TLS secure channel." SOLVED
Exception lors de l'appel de ExecuteQuery" avec 0" argument(s): La demandea été abandonnée: Impossible de créer un canal sécurisé SSL/TLS." : résolu
How to connect to a SSL/ TSL sharepoint site with CSOM in powershell
Start to call a request with your certificate
$CertificateThumbprint = "53836D3C35F949959D7E4038D5D39D7B"
$response = Invoke-WebRequest -Verbose -URI $anUrl -CertificateThumbprint $CertificateThumbprint -UseDefaultCredentials -SessionVariable websession -ErrorAction:Stop
# in this ExecutingWebRequest you should add the certificate to yoour request and add the authentification cookie
$request = $EventArgs.WebRequestExecutor.WebRequest
to list all your available certificate execute following script
Hide Sharepoint Top Nav
Sharepoint Rest Query List
Query sharepoint list with REST
use this end point to query your list http://test/sites/test/_api/Web/Lists/getbytitle('vvv')/items?$select=&$filter= Title eq 'entite du ga 1'
Example : http://test01/sites/test01/_api/Web/Lists/getbytitle('Aliste')/items?$select=Title,ID,Author/Title&$expand=Author&$filter= Title eq 'entite du toto 1'
to order by : &$orderby= Employee asc
to order by : &$orderby= Employee desc
to limit number of items returned : $top 5
to use paging : $skip 5
new paging mode add in your first query &$skiptoken=Paged=TRUE
in your response, you will receive next page query in odata.nextLink as below
/_api/Web/Lists/getbytitle(%27Initiatives%27)/items?%24skiptoken=Paged%3dTRUE%26p_ID%3d266&%24select=Title%2cID&%24orderby=ID+desc&p_ID=268&%24Top=3
expand lookup fields : $expand=city&$select=city/Id
viewfields : $select= Title, ID
filter : $filter=Title eq 'mon noeud' and ID ne 1
Numeric comparisons
- Lt
- Le
- Gt
- Ge
- Eq
- Ne
String comparisons
- startsWith
- substringof
- Eq
- Ne
Date and time functions
- day()
- month()
- year()
- hour()
- minute()
- second()
Full script to add in an Script Editor webpart
Powershell Csom Paged Caml Query
$list = Get-PnPList -Identity $listTitle -ThrowExceptionIfListNotFound
$ctx = Get-PnPContext
$page = $null
$pageNumber = 0;
$rowLimit = 200
Do{
$stringBuilder = New-Object System.Text.StringBuilder
$stringBuilder.Append("<View Scope='RecursiveAll'>") | Out-Null
$stringBuilder.Append("<Query><Where></Where>")| Out-Null
$stringBuilder.Append("<OrderBy><FieldRef Name='ID' Ascending='TRUE' /></OrderBy>")| Out-Null
$stringBuilder.Append("</Query>")| Out-Null
$stringBuilder.Append("<ViewFields>")| Out-Null
$stringBuilder.Append("<FieldRef Name='ID' />")| Out-Null
$stringBuilder.Append("<FieldRef Name='Title' />")| Out-Null
$stringBuilder.Append("</ViewFields>")| Out-Null
$stringBuilder.Append("<RowLimit Paged='TRUE'>$($rowLimit)</RowLimit>")| Out-Null
$stringBuilder.Append("</View>")| Out-Null
$spqQuery = New-Object Microsoft.SharePoint.Client.CamlQuery
$spqQuery.ViewXml = $stringBuilder.ToString();
$spqQuery.ListItemCollectionPosition = $page
$pageNumber ++;
$spqQuery.ViewXml = $stringBuilder.ToString();
$itemki=$list.GetItems($spqQuery);
$spqQuery.ListItemCollectionPosition = $itemki.ListItemCollectionPosition
$ctx.Load($itemki)
$ctx.ExecuteQuery();
Write-Host "################## PAGE " $($page.PagingInfo) " #########################"
Write-Host "processing query results. Recs: $($itemki.Count)"
$Counter = 0;
foreach($item in $itemki)
{
Write-Host "$($item["ID"]) title pageNumber '$($pageNumber)' : $($item["Title"])"
}
$page = $itemki.ListItemCollectionPosition
}
Until($page -eq $null)
Add SPList With CSOM
CSOM ISSUE format-default
format-default : The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.
Managed Navigation Issue
Impossible de se connecter à la banque de termes sur la navigation par méta données gérées
Désolé... Nous n'avons pas pu créer l'ensemble de termes : Aucune connexion au service de métadonnées gérées par défaut n'a été spécifiée.
Sharepoint 2016 Register Javascript In Hive
To register javascript file in 16/layouts
you should write with 15, sharepoint will translate it in 16 : <script type="text/javascript" src="/_layouts/15/testFDI/jquery.min.js"></script>
PowerShell Csom load property Issue
Using Microsoft.SharePoint.Client.dll you can have issue after object loading
$file = $oWeb.GetFileByUrl($fileUrl);
$context.Load($file);
$context.ExecuteQuery()
$context.Load($file.ListItemAllFields)
$context.ExecuteQuery()
$file.ListItemAllFields #accessing to this property will thow exception below
format-default : The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.
so you have to store property in a variable like that
$ListItemAllFields = $file.ListItemAllFields
$context.Load($ListItemAllFields)
$context.ExecuteQuery()
Sharepoint Online Web Templates
Name | Title | Category | Compatiblity Level |
STS#3 | Site d’équipe | Collaboration | 15 |
STS#0 | Site d’équipe (expérience classique) | Collaboration | 15 |
BLOG#0 | Blog | Collaboration | 15 |
BDR#0 | Centre de documents | Entreprise | 15 |
DEV#0 | Site de développeur | Collaboration | 15 |
OFFILE#1 | Centre des enregistrements | Entreprise | 15 |
EHS#1 | Site d’équipe - Configuration SharePoint Online | Entreprise | 15 |
SRCHCEN#0 | Centre de recherche d’entreprise | Entreprise | 15 |
BLANKINTERNETCONTAINER#0 | Portail de publication | Publication | 15 |
ENTERWIKI#0 | Wiki d’entreprise | Publication | 15 |
PROJECTSITE#0 | Site de projet | Collaboration | 15 |
COMMUNITY#0 | Site communautaire | Collaboration | 15 |
COMMUNITYPORTAL#0 | Portail communautaire | Entreprise | 15 |
SITEPAGEPUBLISHING#0 | Site de communication | Publication | 15 |
SRCHCENTERLITE#0 | Centre de recherche de base | Entreprise | 15 |
List templates
ID | Template Name | Description | SP2016 | SP2013 | SP2010 | SP2007 |
-1 | InvalidType | Not used. | Yes | Yes | Yes | Yes |
0 | NoListTemplate | unspecified list type. | Yes | Yes | Yes | No |
100 | GenericList | Custom list. | Yes | Yes | Yes | Yes |
101 | DocumentLibrary | Document library. | Yes | Yes | Yes | Yes |
102 | Survey | Survey. | Yes | Yes | Yes | Yes |
103 | Links | Links. | Yes | Yes | Yes | Yes |
104 | Announcements | Announcements. | Yes | Yes | Yes | Yes |
105 | Contacts | Contacts. | Yes | Yes | Yes | Yes |
106 | Events | Calendar. | Yes | Yes | Yes | Yes |
107 | Tasks | Tasks. | Yes | Yes | Yes | Yes |
108 | DiscussionBoard | Discussion board. | Yes | Yes | Yes | Yes |
109 | PictureLibrary | Picture library. | Yes | Yes | Yes | Yes |
110 | DataSources | Data sources for a site. | Yes | Yes | Yes | Yes |
111 | WebTemplateCatalog | Site template gallery. | Yes | Yes | Yes | Yes |
112 | UserInformation | User Information. | Yes | Yes | Yes | Yes |
113 | WebPartCatalog | Web Part gallery. | Yes | Yes | Yes | Yes |
114 | ListTemplateCatalog | List Template gallery. | Yes | Yes | Yes | Yes |
115 | XMLForm | XML Form library. | Yes | Yes | Yes | Yes |
116 | MasterPageCatalog | Master Page gallery. | Yes | Yes | Yes | Yes |
117 | NoCodeWorkflows | No Code Workflows. | Yes | Yes | Yes | Yes |
118 | WorkflowProcess | Custom Workflow Process. | Yes | Yes | Yes | Yes |
119 | WebPageLibrary | Wiki Page Library. | Yes | Yes | Yes | Yes |
120 | CustomGrid | Custom grid for a list. | Yes | Yes | Yes | Yes |
121 | SolutionCatalog | Solutions. | Yes | Yes | Yes | No |
122 | NoCodePublic | No Code Public Workflow. | Yes | Yes | Yes | No |
123 | ThemeCatalog | Themes. | Yes | Yes | Yes | No |
124 | DesignCatalog | DesignCatalog. | Yes | Yes | No | No |
125 | AppDataCatalog | AppDataCatalog. | Yes | Yes | No | No |
130 | DataConnection Library |
Data connection library for sharing information about external data connections. | Yes | Yes | Yes | Yes |
140 | WorkflowHistory | Workflow History. | Yes | Yes | Yes | Yes |
150 | GanttTasks | Project Tasks. | Yes | Yes | Yes | Yes |
151 | HelpLibrary | Help Library. | Yes | Yes | No | No |
160 | AccessRequest | Access Request List. | Yes | Yes | No | No |
171 | TasksWithTimeline AndHierarchy |
Tasks with Timeline and Hierarchy. | Yes | Yes | No | No |
175 | MaintenanceLogs | Maintenance Logs Library. | Yes | Yes | No | No |
200 | Meetings | Meeting Series (Meeting). | Yes | Yes | Yes | Yes |
201 | Agenda | Agenda (Meeting). | Yes | Yes | Yes | Yes |
202 | MeetingUser | Attendees (Meeting). | Yes | Yes | Yes | Yes |
204 | Decision | Decisions (Meeting). | Yes | Yes | Yes | Yes |
207 | MeetingObjective | Objectives (Meeting). | Yes | Yes | Yes | Yes |
210 | TextBox | Text Box (Meeting). | Yes | Yes | Yes | Yes |
211 | ThingsToBring | Things To Bring (Meeting). | Yes | Yes | Yes | Yes |
212 | HomePageLibrary | Workspace Pages (Meeting). | Yes | Yes | Yes | Yes |
301 | Posts | Posts (Blog). | Yes | Yes | Yes | Yes |
302 | Comments | Comments (Blog). | Yes | Yes | Yes | Yes |
303 | Categories | Categories (Blog). | Yes | Yes | Yes | Yes |
402 | Facility | Facility. | Yes | Yes | Yes | No |
403 | Whereabouts | Whereabouts. | Yes | Yes | Yes | No |
404 | CallTrack | Call Track. | Yes | Yes | Yes | No |
405 | Circulation | Circulation. | Yes | Yes | Yes | No |
420 | Timecard | Timecard. | Yes | Yes | Yes | No |
421 | Holidays | Holidays. | Yes | Yes | Yes | No |
499 | IMEDic | IME (Input Method Editor) Dictionary. | Yes | Yes | Yes | No |
600 | ExternalList | External. | Yes | Yes | Yes | No |
700 | MySiteDocument Library |
MySiteDocumentLibrary. | Yes | Yes | No | No |
1100 | IssueTracking | Issue tracking. | Yes | Yes | Yes | Yes |
1200 | AdminTasks | Administrator Tasks. | Yes | Yes | Yes | Yes |
1220 | HealthRules | Health Rules. | Yes | Yes | Yes | No |
1221 | HealthReports | Health Reports. | Yes | Yes | Yes | No |
1230 | DeveloperSiteDraft Apps |
Draft Apps library in Developer Site. | Yes | Yes | No | No |
3100 | AccessApp | Yes | No | No | No | |
3101 | AlchemyMobileForm | Yes | No | No | No | |
3102 | AlchemyApproval Workflow |
Yes | No | No | No | |
3300 | SharingLinks | Yes | No | No | No | |
Total | 64 | 60 | 52 | 38 |
Css Add a Line Above
Add a line with css above an html element
salut Fred
When the text is too long and goes outside the div or span, add this : white-space: normal;
ul li in line
<ul style="display:inline; list-style: none;">
<li style="display:inline;"><div style="background-color: #FF0000;width: 8px;height: 8px;"> </div></li>
<li style="display:inline;">plop</li>
<li style="display:inline;">plop</li>
<li style="display:inline;">plop</li>
</ul>
display: inline; list-style: none;