A SPFX Field Customiser to show if the item is externally shared
Run each line separate.
npm install
gulp build --ship
gulp bundle --ship
gulp package-solution --ship
Open the folder ./sharepoint/solution to get the file ./sharepoint/solution/externally-shared-field-customiser.sppkg
- Open your App Catalog
- Click on Apps For SharePoint
- Upload the externally-shared-field-customiser.sppkg to the list.
- Tick 'Make this solution available to all sites in the organization', click Deploy
The pnp-FieldTemplate.xml is a PNP template you can use to add the field to your site.
Navigate the the PNP-Template folder, then using Powershell with PNP-PowerShell
Connect-PnPOnline -Url:'https://<yourtenant>.sharepoint.com/sites/DeveloperSite'
Sign in with your credentials
Set-PnpTraceLog -On
Apply-PnPProvisioningTemplate -Path:'.\PnP-Template\pnp-FieldTemplate.xml' -Verbose
Once you have run the template, you can then add the column to any list manually.
- Go to List Settings
- Under Columns, select Add from existing site columns
- Change the group to SPFX Columns
- Select Externally Shared and click Add
- Tick option to Add to default view
- Click Ok
(I'll leave it to you to programmatically add it to your chosen lists)