You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/solution-guidance/custom-field-type-sharepoint-add-in.md
+45-45Lines changed: 45 additions & 45 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
---
2
2
title: Custom field type in the SharePoint Add-in model
3
+
description: The approach you take to provide customized end user experiences is different in the new SharePoint Add-in model than it was with Full Trust Code. In a typical Full Trust Code (FTC) / Farm Solution scenario, custom field types were created with the SharePoint server-side object model code by inheriting from one of the built-in field type classes and creating a field type deployment file (XML).
3
4
ms.date: 11/03/2017
4
5
localization_priority: Normal
5
6
---
6
-
Custom field type in the SharePoint Add-in model
7
-
================================================
7
+
# Custom field type in the SharePoint Add-in model
8
8
9
9
## Summary
10
10
11
-
The approach you take to provide customized end user experiences is different in the new SharePoint Add-in model than it was with Full Trust Code. In a typical Full Trust Code (FTC) / Farm Solution scenario, custom field types were created with the SharePoint server-side object model code by inheriting from one of the built-in field type classes and creating a field type deployment file (XML). These components were deployed via SharePoint solutions.
11
+
The approach you take to provide customized end user experiences is different in the new SharePoint Add-in model than it was with Full Trust Code. In a typical Full Trust Code (FTC) / Farm Solution scenario, custom field types were created with the SharePoint server-side object model code by inheriting from one of the built-in field type classes and creating a field type deployment file (XML). These components were deployed via SharePoint solutions.
12
12
13
13
In a SharePoint Add-ins model scenario, customized end user experiences are implemented via client-side rendering. In this approach, JavaScript files are used to implement customized end user experiences. The remote provisioning pattern deploys the JavaScript files and registers them with SharePoint fields via the JSLink property.
14
14
@@ -24,9 +24,11 @@ Here are some examples of custom field type that implements a Google map. These
24
24

25
25
26
26
**Inline editing showing a larger Google map thumbnail:**
27
+
27
28

28
29
29
30
**A dialog enabling inline editing:**
31
+
30
32

31
33
32
34
## High-level guidelines
@@ -38,89 +40,87 @@ As a rule of a thumb, we would like to provide the following high-level guidelin
38
40
- Register the JavaScript files with the Minimal Download Strategy (MDS) engine to ensure the MDS engine is aware of the custom rendering JavaScript files.
39
41
- Setting JSLink property to host web requires at least full permission at web level, so this approach is not suitable for add-ins at the SharePoint store
40
42
41
-
Options to implement client-side rendering with JavaScript files via the JSLink property
In this option you set the JSLink property on a WebPartDefinition.
54
-
54
+
55
55
-**This approach does not specifically create a custom field type at the SPField level.**
56
-
+ Therefore, *the custom rendering only applies in the List View web part where you set the JSLink property*.
56
+
- Therefore, *the custom rendering only applies in the List View web part where you set the JSLink property*.
57
57
- This approach allows you to change the rendering for one or more SharePoint fields at once.
58
58
- This approach may be done with declarative code, with the SharePoint server-side object model, with the SharePoint client-side object model (CSOM), or via PowerShell.
59
-
+ We recommend you use the SharePoint server-side object model, the SharePoint client-side object model, or PowerShell to set the JSLink property via the remote provisioning pattern.
59
+
- We recommend you use the SharePoint server-side object model, the SharePoint client-side object model, or PowerShell to set the JSLink property via the remote provisioning pattern.
60
60
61
-
**When is it a good fit?**
61
+
### When is it a good fit?
62
62
63
63
When you need to define specific views for SharePoint list data and modify the rendering for more than one SharePoint field, this is a good option.
64
64
65
-
**Getting started**
65
+
### Getting started
66
66
67
67
The following sample sets the JSLink property on a SharePoint List View web part.
+ Includes 9 samples that set the JSLink property on a SharePoint List View web part and an explanation of how each sample was implemented.
71
-
+ The RegisterJStoWebPart method sets the List View web part's JSLink property.
70
+
- Includes 9 samples that set the JSLink property on a SharePoint List View web part and an explanation of how each sample was implemented.
71
+
-The RegisterJStoWebPart method sets the List View web part's JSLink property.
72
72
73
-
Set the JSLink property for a SharePoint field
74
-
----------------------------------------------
73
+
## Set the JSLink property for a SharePoint field
75
74
76
75
In this option you set the JSLink property on an SPField.
77
-
76
+
78
77
-**This approach specifically registers the JSLink property at the SPField level.**
79
-
+ Therefore, *the custom rendering will apply everywhere the SPField is rendered*.
78
+
- Therefore, *the custom rendering will apply everywhere the SPField is rendered*.
80
79
- This approach allows you to change the rendering for one SharePoint field.
81
80
- This approach may be done with declarative code, with the SharePoint server-side object model, with the SharePoint client-side object model, or via PowerShell.
82
-
+ We recommend you use the SharePoint server-side object model, the SharePoint client-side object model, or PowerShell to set the JSLink property via the remote provisioning pattern.
81
+
- We recommend you use the SharePoint server-side object model, the SharePoint client-side object model, or PowerShell to set the JSLink property via the remote provisioning pattern.
83
82
84
-
**When is it a good fit?**
83
+
### When is it a good fit?
85
84
86
85
When you need to define a specific view for a given SharePoint field and ensure the view is always used when the field is rendered, this is a good option.
87
86
88
-
**Getting started**
87
+
### Getting started
89
88
90
89
The following articles demonstrate how to set the JSLink property on a SPField.
91
90
92
91
-[Using the JSLink property to change the way your field or views are rendered in SharePoint 2013 (Tobias Zimmergren)](http://zimmergren.net/technical/sp-2013-using-the-spfield-jslink-property-to-change-the-way-your-field-is-rendered-in-sharepoint-2013)
93
92
-[Using JSLink with SharePoint 2013 (MSDN Magazine)](https://msdn.microsoft.com/magazine/dn745867.aspx)
94
93
95
-
Challenges with implementing client-side rendering with JavaScript files via the JSLink property
- You can load multiple JavaScript files via the JSLink property.
115
-
+ This is especially helpful if you have a library of JavaScript files that implement your client-side rendering.
116
-
+ Consider using this approach when targeting mobile devices because it allows you to deliver just the JavaScript you need to implement a given SharePoint field's client-side rendering.
117
-
+ Use the | character to separate the JavaScript files you wish to load.
- This is especially helpful if you have a library of JavaScript files that implement your client-side rendering.
115
+
- Consider using this approach when targeting mobile devices because it allows you to deliver just the JavaScript you need to implement a given SharePoint field's client-side rendering.
116
+
- Use the | character to separate the JavaScript files you wish to load.
- [SPField.JSLink property (MSDN API Docs)](https://msdn.microsoft.com/library/microsoft.sharepoint.spfield.jslink.aspx)
125
125
- [Using the JSLink property to change the way your field or views are rendered in SharePoint 2013 (Tobias Zimmergren)](http://zimmergren.net/technical/sp-2013-using-the-spfield-jslink-property-to-change-the-way-your-field-is-rendered-in-sharepoint-2013)
126
126
- [Using JSLink with SharePoint 2013 (MSDN Magazine)](https://msdn.microsoft.com/magazine/dn745867.aspx)
Copy file name to clipboardExpand all lines: docs/solution-guidance/delegate-controls-sharepoint-add-in.md
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,18 @@
1
1
---
2
2
title: Delegate controls in the SharePoint Add-in model
3
+
description: The approach you take to implement delegate controls in your code is different in the new SharePoint Add-in model than it was with Full Trust Code. In a typical Full Trust Code (FTC) / Farm Solution scenario, delegate controls were built as user controls or web controls, registered with features, and deployed via SharePoint Solutions.
3
4
ms.date: 05/20/2020
4
5
localization_priority: Normal
5
6
---
6
-
Delegate controls in the SharePoint Add-in model
7
-
================================================
7
+
# Delegate controls in the SharePoint Add-in model
8
8
9
9
## Summary
10
10
11
11
The approach you take to implement delegate controls in your code is different in the new SharePoint Add-in model than it was with Full Trust Code. In a typical Full Trust Code (FTC) / Farm Solution scenario, delegate controls were built as user controls or web controls, registered with features, and deployed via SharePoint Solutions.
12
12
13
13
In an SharePoint Add-in model scenario, JavaScript is embedded in SharePoint pages to implement the same functionality as delegate controls.
14
14
15
-
High Level Guidelines
16
-
---------------------
15
+
## High Level Guidelines
17
16
18
17
As a rule of a thumb, we would like to provide the following high level guidelines for creating delegate controls in the new SharePoint Add-in model.
19
18
@@ -24,12 +23,14 @@ As a rule of a thumb, we would like to provide the following high level guidelin
24
23
See the [User controls and web controls (SharePoint Add-in Model Recipe)](user-controls-and-web-controls-sharepoint-add-in.md) to learn how to embed JavaScript to all SharePoint pages with custom user actions and how to embed JavaScript directly into page layouts and master pages.
25
24
26
25
## Related links
26
+
27
27
-[Cross site collection navigation (O365 PnP Video)](https://channel9.msdn.com/blogs/OfficeDevPnP/Cross-site-collection-navigation)
28
28
- Guidance articles at [https://aka.ms/OfficeDevPnPGuidance](https://aka.ms/OfficeDevPnPGuidance"Guidance Articles")
29
29
- References in MSDN at [https://aka.ms/OfficeDevPnPMSDN](https://aka.ms/OfficeDevPnPMSDN"References in MSDN")
30
30
- Videos at [https://aka.ms/OfficeDevPnPVideos](https://aka.ms/OfficeDevPnPVideos"Videos")
0 commit comments