1

I have a custom action for the menu, but I can not see it. 1. I am site collection admin 2. I checked the feature and its there 3. I checked the package and is there 4. I checked the 14 hive and updated xml files are there when I update the solution.

What else should I check?

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <CustomAction Id="SiteActionsToolbar" Rights="ApplyStyleSheets" GroupId="SiteActions" Location="Microsoft.SharePoint.StandardMenu"  Sequence="1010" Title="Create New Workspace" Description="Create a new xx Workspace" ImageUrl="/_layouts/images/NewContentPageHH.png">
        <UrlAction Url="_layouts/xx/CreateWorkspace.aspx"/>
    </CustomAction>
    <CustomAction Id="SiteActionsToolbar" Rights="ApplyStyleSheets" GroupId="SiteActions" Location="Microsoft.SharePoint.StandardMenu" Sequence="1020" Title="xx Access Request List"  Description="View Access Requests for xx Teams Workspaces" ImageUrl="/_layouts/images/Permissions32.png">
        <UrlAction Url="Lists/RequestAccessHome/AllItems.aspx"/>
    </CustomAction>
</Elements>
  • Hi super I try your custom action and it's works fine.any error u found in deployment? – Vishal_Sharepoint Apr 5 '12 at 6:42
  • when I execute the update-sp solution it works fine also. – Luis Valencia Apr 5 '12 at 7:06
1

Make sure you check your URLs. These URLs are relative to the current address, so in your CAs if you're inside a list, for example, your URL action won't go to the expected URL.

In other words, if your current URL is http://site/Lists/Calendar.aspx, your first CA will action to http://site/Lists/Calendar.aspx_layouts/xx/CreateWorkspace.aspx, which probaly isn't what you want, and will ruin any permission checking you may want to do too.

Instead, prepend ~site or ~sitecollection to the from of your URL action:

<UrlAction Url="~site/_layouts/xx/CreateWorkspace.aspx"/> 

.b

  • what I did is to enable-sp feature with the -force parameter and then it worked. Apparently something messed up in another deployment, but after doing force it works again. – Luis Valencia Apr 5 '12 at 11:06

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.