i'm creating a Provider-Hosted add-in for Sharepoint online and i want to select multiple files and send their ids with or their urls as query parameters in the CommandAction of a custom ribbon placed in the command bar.
Inside the i can use the EnabledScript to show the button when there are selected files but i can't find a way to run a script or append the files ids to the url inside CommandAction.
For what i read here https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/sharepoint-add-ins-ux-design-guidelines?redirectedfrom=MSDN#figure-4-a-custom-action-in-the-contextual-menu CustomAction can't have javascript code and actually returns an error.
But in multiple places in the documentation, for example here https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/add-a-custom-ribbon-to-your-sharepoint-site#using-the-coreribboncommands-app, they show javascript code inside the CommandAction. Is it out-dated?
Also when selecting multiples files most of the tokes listed here https://docs.microsoft.com/en-us/sharepoint/dev/schema/commanduihandler-element, appear as empty.
This person wanted to do the same as me but was never answered SharePoint Online Ribbon Custom Action : Pass multiple itemId in CommandAction's Url.
So is it possible to select multiple files and redirect to my server with the ids of them?