.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Is there a way to conditionally enable/disable a custom action

Posted By:      Posted Date: September 07, 2010    Points: 0   Category :SharePoint
I've created a custom action that kicks off a workflow on an item in a list.  I want the workflow to be initiated only once.  So, once it is kicked off the first time, I'd like the custom action to be disabled so others cannot start it again. Is there a way to do this in Sharepoint Designer?

View Complete Post

More Related Resource Links

How to conditionally Enable/Disable Button control using JavaScript ?

hi all... i have a Button control & a TextBox control on my web page. The Button control is initially Disabled. I want that while typing into TextBox, when the length of the contents of TextBox reaches to 12 (i.e. when i type 12th character), the Button Control should be Enabled & if the length again comes down to less than 12, the Button control should again be Disabled... How can i do this using JavaScript...?? Does anyone know how to do this...?? Please help. It's urgent... Thanx in advance to all posts !

Checkbox disable/enable


I hope someone can be kind enough to help/advise me with this.

I have a web form with multiple checkboxes on it , with one of the checkboxes as the main (controlling) checkbox.  By this I mean that when this main checkbox is checked then all the other checkboxes need to be disable and when its unchecked these other checkboxes need to be enable.

I've found (plenty of) code to do this in javascript but i would really prefer to to it in vb(.net), if possible.

I hope all this makes sense to you.


How To Conditionally Show ListViewByQuery On Custom Page


I would like to only show a ListViewByQuery control on a custom page if the query contains some data. Currently if the query returns no data it is still rendered on the page with the comment "There are no items to show in this view".

The following code is my query code:

querySM.ViewFields = "<FieldRef Name='AssignedTo'/>" +
                  "<FieldRef Name='RequestSMReviewerComments' />" +
                  "<FieldRef Name='WorkflowOutcome' />";

        sQueryStr = "<Where>" +
                 "<And>" +
                  "<IsNotNull>" +
                   "<FieldRef Name='RequestSMReviewerComments' />" +
                  "</IsNotNull>" +
                  "<Eq>" +
                   "<FieldRef Name='WorkflowInstanceID' />" +

How to enable check in check out functionality for a custom list?



how could i enable check in check out functionality for a custom list? I know this exists for document libraries, but isnt this possible for custom lists?

Best regards,
Yavuz B.

My Blog http://www.starcoder.net

sitemap control user rights enable and disable



iam using masterpage and sitemap in my project, what i want to is that

if user login is did, based on the user previlage in need to show the sitemap menu page

if user i have the previlage to see the page then i should enable that page otherwise

i need disable that page

looking for the valuable suggestions

TabControl - Disable/Enable tab page

I have a tabcontrol with 2 pages. OnLoad the 2nd Tabpage shall be disabled (grayed out and not selectable). Later with code I need to enable the 2nd tab. Any Ideas how this can be done? please./Morten

Custom Ribbon action using quick step for workflow

I created custom button using the quick step in ribbon, and configured to invoke a workflow. It shows start and stop page of workflow where I have to click start. How to start workflow directly from the ribbon without this redirection to page.  

Cannot enable Ribbon Edit Tab buttons and "connect" them to a list item in my custom webpart

I have one list with some custom fields and I want to develop a custom page. So, I created an ASPX page and added my custom webpart. This webpart has just a RichTextField, in edit mode, "linked" to one item of the list, like below: SPSite _SPSite = SPContext.Current.Site; SPWeb _SPWebProjects = _SPSite.OpenWeb("/Projects"); SPList _SPListProject = _SPWebProjects.GetList("/Projects/Lists/Project"); int _ID = Convert.ToInt32(this.Page.Request.QueryString["ID"]); RichTextField _RTF = new RichTextField(); _RTF.ID = "RTF"; _RTF.ControlMode = SPControlMode.Edit; _RTF.FieldName = "History"; _RTF.ItemContext = SPContext.GetContext(HttpContext.Current, _ID, _SPListProject.ID, _SPListProject.ParentWeb); _RTF.RenderContext = SPContext.GetContext(HttpContext.Current, _ID, _SPListProject.ID, _SPListProject.ParentWeb); this.Controls.Add(_RTF);   Then, I "turned on" the edit tab on the ribbon by doing the follow: protected override void OnPreRender(EventArgs e) { SPRibbon _CurrentRibbon = SPRibbon.GetCurrent(this.Page); _CurrentRibbon.TrimById("Ribbon.WebPartPage"); _CurrentRibbon.MakeTabAvailable("Ribbon.ListForm.Edit", string.Empty); _CurrentRibbon.MakeContextualGroupInitiallyVisible("Ribbon.ListForm.Edit", string.Empty); _CurrentRibbon.Minimized = false; _CurrentRi

Enable Disable Save Button in Winforms App

Hi, In our windows forms application we have many forms with "Save" buttons. We want to enable them only if the data in the form is changed. At the moment it is handed by adding flags to check whether the data is dirty. Is there any easy way to handle this? May be something with the famework? Thanks,CJ

conditionally hide a field in a custom form using SharePoint Designer

I'm able to hide a field based on a security group. but, how do you hide a field based on a value in another field? Custom form opens, if fieldTwo = "taco", hide fieldOne.    

Using UserName to enable disable access to InfoPath form fields

Hi Everyone, I have created a browser enable form in InfoPath and restrict certain fields depending on the official logged on User Name. Now this works most of the time but my problem has to do with the "case" of User Names for some of the site users. In most cases the User Name is an exact match but for some reason, some user's names are reported by SharePoint (the Welcome at top of screen) with some parts captilized. Example - my hidden filed on the form reports my user name as xrs_master but the Welcome up top says XRS_Master - and the fields act as though I am not the correct user and won't enable. On the other hand there are users who's user name matches the case exactly and all works fine. Why is SharePoint reporting the user name differently? And if this is the reason they don't match, how do I fix it? Any Ideas? Many thanks in advance for help!

List item custom action with custom url

Hello, Is it possible to create a listitem custom action with an url that contains {fieldname} instead of  {ItemId}, {ItemUrl}, {ListId}, {SiteUrl}, for example http://MYSPSITEURL/SitePages/custompage.aspx?Field=} ? {Title  

How to include a javascript file in a custom action?

I need to call a custom javascript function from a ribbon button, how do I include the javascript file within the custom action solution in order that it will be properly referenced by the html output? I am not allowed to define a custom masterpage at this point. So what can I do?   Thanks, Stephan  

Enable/Disable controls in a td when checkbox is checked

hi,I have a table with 10 rows.Each row having 3 asp controls (checkbox,textbox and dropdownlist).on pageload all controls except checkboxes should be disabled and If we check any checkbox the controls(textbox and dropdownlist) in that row are should be enable.pls reply me.Thanks in Advance.

HDI : Enable and Disable checkboxes inside of DataGrid Template

I am again trying stuff that is a challenge.What i need to do is to enable and disable checkboxes in the gridI enable/disable them when i bind in grdDocApprovals_ItemDataBoundusing the following syntax( (CheckBox)e.Item.FindControl("chkReceived" )).Enabled = true;( (CheckBox)e.Item.FindControl("chkApproved" )).Enabled = false;That works wonderful. It disables the checkbox and i can not tick it.Now the problem comes in when i Tick the chkReceived box then i executemy javascript that finds the chkApproved box and is suppose to enable it.I noticed that in the HTML code during runtime there is a span and a td thatsurrounds the chkApproved. The <span>have a disabled = 'disabled' tag.and no matter what i do i can not get the chkApproved to be enabled. <span disabled="disabled"><input id="_ctl0_ContentMain_grdDocApprovals__ctl3_chkApproved" type="checkbox" name="_ctl0:ContentMain:grdDocApprovals:_ctl3:chkApproved" disabled="disabled" onclick="javascript:return response(this);" /></span>what can i do to get it active?

When a Task Expired step in a Start Custom Task Process action is not fired?!

When a Task Expired step is not fired?! I created a simple Workflow using the SharePoint Designer. Added one step to which I added the Start Custom Task Process and set the Due Date "2 minutes after now". For the When a task Expired step of the custom Task I added a Log to History List action, which doesn't seems to be fired. What good be wrong??? All the steps I did to create the workflow: Started SP Designer 2010 and created a reusalbe WF. Added Start Custom Task Process action to step 1. Changed the behavior of the When a task Expired stepof the custom task (added a Log to History List action). Changed the behavior of the Before Task is Assigned by adding a Set Field action which set the Due Date of the task to "Now + 2 minutes". Published the WF and started the WF for a simple list item. Unfortunately the Log to History List actionof the When a task Expired step is never called.

Issue with Enable and Disable Parameters in SSRS 2005

Hi Guys, I am currently facing an issue with Enabling and Disabling Parameters in SSRS 2005. Here is my scenario. I am having the following 4 parameters - ParamType (has values 1,2,3), ParamMonth, ParamStartDate, ParamEndDate Now What I want is When I select ParamType = 1 and 2 then ParamMonth should be enabled and ParamStartDate and ParamEndDate should be disabled. When I select ParamType = 3 then ParamStartDate and ParamEndDate should be enabled and ParamMonth should be disabled. I have done google search on this issue and found out that this is not possible at run time. Is there any alternative for this issue? If the above is not possible, I would like to get atleast in this way : When I select ParamType = 1 and 2 then ParamMonth should show the values (from dataset named MonthDataSet and default should be the latest Month) and ParamStartDate and ParamEndDate should show as NULL. When I select ParamType = 3, then I need to enter ParamStartDate and ParamEndDate values manually or pick via datepicker and ParamMOnth should show as NULL. I am not sure whether this is possible or not....but just trying to get in some way. Here is the query used in MonthDataSet : Select Month_Code, Month_Name from MonthTable. Thanks
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend