I cannot use JSOM to add to the menu permanently because I want the item only appear on a particular page and "SP Callout actions" is not working for custom list / generic list
Do you know a solution or a workaround ?
Thanks in advance
Nathan
Steps to reproduce
Create a JavaScript file with the Custom_AddListMenuItems function
function Custom_AddListMenuItems(m, ctx) {CAMOpt(m, "Hello World", "alert('Hello World')", "");}
Edit a page and link the JS file to a new Content Editor Web Part
Add a web part from any list to the page and check that in the webpart view the column "Title (linked to item with edit menu)" is displayed.
The "m" parameter is set to null and them item is not added.
Expected behavior
A new item "Hello World" in the edit menu > "..." is added.
Target SharePoint environment
SharePoint Server 2019 (on-premise)
What SharePoint development model, framework, SDK or API is this about?
Site designs & site scripts
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
Internet Explorer
Describe the bug / error
Hello,
We just migrated from SharePoint 2013 to 2016, then 2019.
We create items in the menu in JavaScript via the CAMOpt () function. In 2013 and 2016, everything is working perfectly, but not in 2019.
The "m" parameter in the function CAMOpt is constantly null and the item is not added.
CAMOpt(m,"Add to...","AddTo('"+listName + "'," + currentItemID +");");
The issue is identical to the following topic (which has been closed and reported as a bug): Can't add element to ECB menu in Sharepoint 2019
I cannot use JSOM to add to the menu permanently because I want the item only appear on a particular page and "SP Callout actions" is not working for custom list / generic list
Do you know a solution or a workaround ?
Thanks in advance Nathan
Steps to reproduce
function Custom_AddListMenuItems(m, ctx) {CAMOpt(m, "Hello World", "alert('Hello World')", "");}
Expected behavior
A new item "Hello World" in the edit menu > "..." is added.