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}&SPListItemId={SelectedItemId}&SPListId={SelectedListId}&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?