Navigate to the above-created directory.
Run Yeoman SharePoint Generator to create the solution.
Yeoman generator will present you with the wizard by asking questions about the solution to be created.
Solution Name
Hit Enter to have the default name (spfx-extensions-fieldcustomizer in this case) or type in any other name for your solution.
Preferred choice - Hit Enter
Target for component
Here, we can select the target environment where we are planning to deploy the client webpart; i.e. SharePoint Online or SharePoint OnPremise (SharePoint 2016 onwards).
Preferred choice - SharePoint Online only (latest)
Place of files
We may choose to use the same folder or create a subfolder for our solution.
Preferred choice - Same folder
Deployment option
Selecting Y will allow the app to deployed instantly to all sites and will be accessible everywhere.
Preferred choice - N (install on each site explicitly)
Type of client-side component to create
We can choose to create client side webpart or an extension.
Preferred choice - Extension
Type of client-side extension to create
We can choose to create Application customizer, Field customizer, or ListView Command Set.
Preferred Choice - Field Customizer
Field customizer name
Hit enter to select the default name or type in any other name.
Preferred choice - PercentFieldCustomizer
Field customizer description
Hit Enter to select the default description or type in any other value.
Preferred choice - Displays field in percentage
Framework to use
Select any JavaScript framework to develop the component. Available choices are (No JavaScript Framework, React).
Preferred choice - No JavaScript Framework
Yeoman generator will perform scaffolding process to generate the solution. The scaffolding process will take a significant amount of time.
Once the scaffolding process is completed, lock down the version of project dependencies by running below command
In the command prompt, type the below command to open the solution in a code editor of your choice.
Solution Structure
The solution structure is similar to client-side web parts with similar configuration options.
The file PercentFieldCustomizerFieldCustomizer.manifest.json inside the folder “\src\extensions\percentFieldCustomizer\” defines the extension type and unique identifier for the solution. Please note down the id. We will need it later for debugging purposes.