4

I am developing custom ribbon action using SharePoint hosted app. and this is working fine.When i select any list item and click on custom action then i can get selected list item id.

<CommandUIHandler Command="Invoke_SendEmailButtonRequest"CommandAction="siteUrl/Pages/test.aspx?{StandardTokens}&amp;SPListItemId={SelectedItemId}&amp;SPListId={SelectedListId}&amp;SiteUrl={SiteUrl}"/>                    
</CommandUIHandlers>

But Problem is:

In above code SPListItemId={SelectedItemId} will pass only single item id. But i want to pass multiple selected item's id through that url.

According to This Article i tried by adding java-script to CommandAction. but i'm getting the following error :

Error occurred in deployment step 'Install SharePoint Add-in': There were errors when validating the App Package.

After googling i found Reason behind this error is

Custom action urls must start with "http:", "https:", "~appWebUrl" or "~remoteAppUrl". The url "javascript:DoSomething();" is not in the right format.

So how i can pass multiple selected item's id?

1
  • Greetings! Have You found the soulution for 'SharePoint Online Ribbon Custom Action : Pass multiple itemId in CommandAction's Url'?..
    – Gennady G
    Sep 24, 2018 at 12:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.