0

I have a declarative sandbox solution in SP2010. It contains 3 customaction scriptlinks to javascript files that are deployed into the style library.

On feature Activation it adds the 3 links and on feature deactivation it removes the 3 links.

However.....This has gone thru a couple of interations and deployments and now when I activate the links appear twice each and deactivate leaves one set of links.

I think deactivating the solution, prior to de-activating the feature has left 3 orphaned CustomActions from the previous incarnation of the solution.

In the latest version I have given the CustomAction ID's, hopefully this will prevent any future issues.

But right now, I need to remove the 3 Orphaned Custom Actions on my site collection. I'm not sure how, where these may live in the object model or anything really?

Can they be removed with some powershell? Or better Still some client side code (2010 remember).

1

I'm trying to think back to the specific circumstances, but the last time I had this problem I believe I used SharePoint Manager to pull out the orphaned ones.

  • Handy to know at least it in the OM then, but do you remember where in SPM sandbox CA's live? I can take a look then and figure out what script to write, as I don't have access to SPM on the platform that has the problem. – BinaryJam Jun 10 '14 at 13:47
  • I believe there's a UserCustomActions collection on the SPSite object. Try doing a Get-SPSite http://url/to/site/collection | Get-Member and see if it's on there. Once you remove the offending custom action, you have to update the custom action collection. There's an update() method on the UserCustomActions object if I remember correctly. – webdes03 Jun 11 '14 at 0:36

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.