Deploying Form customizers
To deploy form customizers, they need to be associated with a content type. Hence, the scripts we need to run will include updating the content type.
PnP PowerShell
In the case of PnP PowerShell, the cmdlet to update a content type is as follows:
Set-PnPContentType(https://pnp.github.io/powershell/cmdlets/Set-PnPContentType.html)
The command we need is the following:
Set-PnPContentType -Identity "Packt Product" -List "Products" -NewFormClientSideComponentId "f6ec214d-9520-48a8-86c6-806c6898e10f" -EditFormClientSideComponentId "f6ec214d-9520-48a8-86c6-806c6898e10f" -DisplayFormClientSideComponentId "f6ec214d-9520-48a8-86c6-806c6898e10f"
The IDs can be found in the manifest of the form customizer in the solution. Running the preceding command associates the New, Edit, and Display custom forms to the Packt Product content type.
CLI for Microsoft 365
The command required here is as follows...
 
                                             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
     
         
                 
                 
                 
                 
                 
                 
                 
                 
                