I deployed a custom ECB item action,
I can see it at item level but when I click on it, nothing change.
This is the definition of the custom action:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
ScriptBlock="function view(IDItem){
var options = {
title: 'aaa',
width: 600,
height: 600,
dialogReturnValueCallback: RefreshOnDialogClose,
showClose:true,
url: '~site/Lists/MyList/NewForm.aspx?IdAAA='+IDItem
};
SP.UI.ModalDialog.showModalDialog(options);
}"
Location="ScriptLink">
</CustomAction>
<CustomAction
RegistrationType="List"
RegistrationId="{960D4C74-883E-43E4-9B1F-0FF506D3D2B8}"
Location="EditControlBlock" Sequence="106"
Title="Add new"
Rights="EditListItems,AddListItems,DeleteListItems">
<UrlAction
Url="javascript:view('{ItemId}')"/>
</CustomAction>
</Elements>
Url="javascript:view('{ItemId}')"/>
toUrl="javascript:view({ItemId});"/>
. Also perhaps try to use_sppagecontextinfo.webabsoluteurl
instead of~site
– Nadeem Yousuf-AIS Dec 4 '14 at 16:20