0


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>
  • Try changing Url="javascript:view('{ItemId}')"/> to Url="javascript:view({ItemId});"/>. Also perhaps try to use _sppagecontextinfo.webabsoluteurl instead of ~site – Nadeem Yousuf Dec 4 '14 at 16:20
  • On other farm is working fine (same code). – Nk SP Dec 4 '14 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.