If you want to open the new form in another list using SharePoint Lists JSON formatting, it is pretty straightforward.
All you need to do is to use the href property in a link object inside of your custom HTML generated by list formatting, and point it to the relative path of the new item form of the list you want to open, for example:
/sites/<your site>/Lists/<your list>/NewForm.aspx
Imagine you have an issues list in your site, you could use the below JSON template:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "a",
"attributes": {
"class": "ms-fontColor-themePrimary ms-fontWeight-semibold",
"target": "_blank",
"href": "/sites/SharePointFormsDemo/Lists/Issues/NewForm.aspx"
},
"style": {
"text-decoration": "none"
},
"children": [
{
"elmType": "span",
"attributes": {
"iconName": "CircleAdditionSolid"
},
"style": {
"margin-right":...
Source link
More About This Author
-
SharePoint and Office 365 Consultant/Developer always trying to get the best from Microsoft stack (Microsoft 365/Azure/Power Platform and related stuff).
Living in Ireland since 2018, I had previously worked in Brazil as a consultant/developer for Office 365, SharePoint and related technologies for almost 10 years.
Array
- Modern Workplace13 April 2024Power Pages and Cloud Flows – Validate user against Dataverse records based on Contact ID
- Modern Workplace6 April 2024Download SharePoint library files in Power Pages with JavaScript and Cloud flows – Improved code using jQuery & option to open PDF file in a new tab
- Modern Workplace13 March 2024Handle multiple N:N records associate and disassociate requests with JavaScript and Power Pages Web API
- Modern Workplace17 February 2024Generic JavaScript Functions to Associate and Disassociate Dataverse records using the Power Pages Web API