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
* Migrate extension tutorials from gulp to heft build system
* Minor changes
* Changed heft command to bold
* Updated building-simple-field-customizer.md to heft
* Fix command formatting.
Copy file name to clipboardExpand all lines: docs/spfx/extensions/get-started/building-form-customizer.md
+29-16Lines changed: 29 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Build your first Form customizer extension
3
3
description: Form customizers are SharePoint Framework components giving you an option to override the form experience at a list or library level by associating the component with the used content type.
4
-
ms.date: 11/14/2025
4
+
ms.date: 01/06/2025
5
5
ms.custom: scenarios:getting-started
6
6
---
7
7
@@ -15,8 +15,6 @@ Form customizers are SharePoint Framework components that give you an option to
15
15
> [!TIP]
16
16
> You can find the output from this tutorial from [GitHub](https://github.com/pnp/spfx-reference-scenarios/tree/main/samples/spfx-formcustomizer-basics).
1. Create a new project directory in your favorite location.
@@ -144,7 +142,7 @@ You can test and debug your Form Customizer within a live SharePoint Online site
144
142
145
143
Let's call out a few specific topics from the **serve.json** file
146
144
147
-
- You can see multiple different configurations that can be used to debug new, edit, and view forms with specific query parameter differences. You can define the used configuration in your gulp serve command, for example, as `gulp serve --config=helloWorld_EditForm`
145
+
- You can see multiple different configurations that can be used to debug new, edit, and view forms with specific query parameter differences. You can define the used configuration in your **heft start** command, for example, as **heft start --serve-confighelloWorld_EditForm**.
148
146
- componentId is automatically associated to be the first list formatting component in your solution (if you have multiple components)
149
147
- To simplify the debugging, you do not need to define the target content type `id` to which the component is associated, but in the runtime, the association is performed in the content type level by updating at least one of the following properties in the content type:
150
148
- ContentType.**NewFormClientSideComponentId** - component id for new form
@@ -157,7 +155,7 @@ You can test and debug your Form Customizer within a live SharePoint Online site
157
155
1. Compile your code and host the compiled files from the local machine by running this command:
158
156
159
157
```console
160
-
gulp serve
158
+
heft start
161
159
```
162
160
163
161
When the code compiles without errors, it serves the resulting manifest from **https://localhost:4321**.
@@ -187,6 +185,11 @@ Now that we have created the baseline component and tested that it works properl
1. Open the **./src/extensions/helloWorld/loc/en-us.js** file, and add new **Title** string to the file. File content should be as follows after your edits.
@@ -205,7 +208,7 @@ Now that we have created the baseline component and tested that it works properl
205
208
1. Open the **./src/extensions/helloWorld/HelloWorldFormCustomizer.module.scss** file, and update the styling definition as follows. We are adding error styling for the component.
@@ -225,6 +228,7 @@ Now that we have created the baseline component and tested that it works properl
225
228
SPHttpClient,
226
229
SPHttpClientResponse
227
230
} from '@microsoft/sp-http';
231
+
import * as strings from 'HelloWorldFormCustomizerStrings';
228
232
```
229
233
230
234
1. Include **_item** and **_etag** private types inside of the **HelloWorldFormCustomizer** class as shown in this code snippet. Notice that the class definition already exists in your code.
@@ -237,7 +241,7 @@ Now that we have created the baseline component and tested that it works properl
237
241
// Added for the item to show in the form; use with edit and view form
238
242
private _item: {
239
243
Title?: string;
240
-
};
244
+
} = {};
241
245
// Added for item's etag to ensure integrity of the update; used with edit form
242
246
private _etag?: string;
243
247
```
@@ -261,7 +265,7 @@ Now that we have created the baseline component and tested that it works properl
261
265
.then(res => {
262
266
if (res.ok) {
263
267
// store etag in case we'll need to update the item
this.domElement.querySelector(`.${styles.error}`).innerHTML = `An error has occurred while saving the item. Please try again. Error: ${error.error.message}`;
1. Create a new project directory in your favorite location.
@@ -186,7 +184,7 @@ You cannot currently use the local Workbench to test SharePoint Framework Extens
186
184
1. Compile your code and host the compiled files from the local machine by running this command:
187
185
188
186
```console
189
-
gulp serve
187
+
heft start
190
188
```
191
189
192
190
When the code compiles without errors, it serves the resulting manifest from **https://localhost:4321**.
@@ -248,7 +246,7 @@ The default solution takes advantage of a new Dialog API, which can be used to s
248
246
1. In your console window, ensure that you do not have any exceptions. If you do not already have the solution running in localhost, execute the following command:
249
247
250
248
```console
251
-
gulp serve
249
+
heft start
252
250
```
253
251
254
252
1. Accept the loading of debug manifests by selecting **Load debug scripts** when prompted.
@@ -363,13 +361,13 @@ Since solutions will by default use the **asset packaging** capability, your Jav
363
361
1. In the console window, enter the following command to package your client-side solution that contains the extension so that we get the basic structure ready for packaging:
364
362
365
363
```console
366
-
gulp bundle --ship
364
+
heft build --production
367
365
```
368
366
369
367
1. Execute the following command so that the solution package is created:
370
368
371
369
```console
372
-
gulp package-solution --ship
370
+
heft package-solution --production
373
371
```
374
372
375
373
The command creates the following package: **./sharepoint/solution/command-extension.sppkg** folder:
Copy file name to clipboardExpand all lines: docs/spfx/extensions/get-started/building-simple-field-customizer.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Build your first Field Customizer extension
3
3
description: Extensions are client-side components that run inside the context of a SharePoint page. Extensions can be deployed to SharePoint Online, and you can use modern JavaScript tools and libraries to build them.
4
-
ms.date: 09/18/2025
4
+
ms.date: 01/09/2026
5
5
ms.custom: scenarios:getting-started
6
6
---
7
7
# Build your first Field Customizer extension
@@ -12,8 +12,6 @@ You can follow these steps by watching the video on the Microsoft 365 Platform C
@@ -320,13 +318,13 @@ Now you're ready to deploy the solution to a SharePoint site and get the field a
320
318
1. In the console window, enter the following command to package your client-side solution that contains the extension so that we get the basic structure ready for packaging:
321
319
322
320
```console
323
-
gulp bundle --ship
321
+
heft build --production
324
322
```
325
323
326
324
1. Execute the following command so that the solution package is created:
327
325
328
326
```console
329
-
gulp package-solution --ship
327
+
heft package-solution --production
330
328
```
331
329
332
330
The command creates the package: **./sharepoint/solution/field-extension.sppkg**:
@@ -374,3 +372,4 @@ The process for publishing your app is identical among the different extension t
374
372
375
373
- [Build your first ListView Command Set extension](building-simple-cmdset-with-dialog-api.md)
376
374
- [Overview of SharePoint Framework Extensions](../overview-extensions.md)
0 commit comments