Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have three custom action buttons on a list created through SharePoint Designer. All three buttons execute a workflow and I need to show/hide or enable/disable the buttons based on certain conditions (e.g. workflow has been executed already, or a value in a column).

[edit, taken from comments]
As far as I know it can't be done in SPD, so I'm looking for some code written with Visual Studio to change the behaviour of these buttons. [/edit]

Can someone please provide me with some guidance.

Thanks

share|improve this question

1 Answer 1

Have you seen things like that build with SP-Designer? Because when you open your Custom-Action, all you can link to a form, link to a workflow or navigate to an url. Other options are button image, Rights mask & a sequence number.
From my point of view I would say: Your only chance is to build a form with Infopath and put there some logic that decides visibility and starts your workflow. But I'm no expert in this, I would do it Visual Studio and JavaScript. And I would wonder if this is possible.

share|improve this answer
    
I know that can not be done with SP-Designer. What I'm wondering is if there is a way to modify the behaviour after-the-fact. So,the button was created with SharePoint Designer, but maybe there is a way to write code that manipulates the button in VS? –  adaptive Feb 2 '12 at 15:04
    
Ah, okay, I didn't read that out from your question. You should edit it to what you wrote here in comment. Well, as far as I experienced, it would be quite challenging. Why? Because When I build something using VS, I was not able to see anything using SPD. The other way round I have no idea how to find out the IDs of SPD-elements. E.g., all SPD-Workflows ends up in WrkFl.aspx or something like that. –  Shegit Brahm Feb 2 '12 at 15:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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