Posts

Showing posts from June, 2014

SharePoint 2010 Hide Ribbon using JQuery in "EnabledScript"

Image
Problem Understanding: In SharePoint ribbon control there is “EnabledScript” parameter that used to enable and disable the icon from the ribbon based on the condition logic in your method. So the requirement is to hide the button from the ribbon instead of disabled it. Requirement: Hide the button from the ribbon instead of disables it. Solution: In SharePoint ribbon control there is “EnabledScript” parameter that used to enable and disable the icon. So in this function I decided to hide the ribbon control using JQuery. Here comes the problem the ID of the icon is     “ DATA.SharePoint.Ribbon.NewControlInExistingGroup.NotifyLarge ” and it contains the “.” So to escape the “.” We required to add the “\\” in front of “.”. Implementation: So the following Script that I used to hide the ribbon icon. In this code I checked the controlexistId control existence and based on the logic I hide the icon. EnabledScript = "javascript:EnableDisable() function EnableDisa...

Nintex Object Model (Required Field validator to custom properties)

Image
Background: It almost take 2 days to find the way to apply the required field validator to the custom control properties. So I decided to share with this information to all other fobs working with Nintex object model. Goal: Apply Required Field validator to custom properties. So apply the required field validator we need to put the following code at the top of the properties attribute section. Required (ErrorMessageResourceType =  typeof (Core), ErrorMessageResourceName =  "ValidationFieldRequired" ) So the full code would be goes like this. The marked yellow are required parameters to make the fields to required.  [ControlPropertyInfo(ResourceType = typeof(Core), DisplayName = "MyRrequiredField", GroupName = "Rrequired", DisplayOrder = 6, Required = true, ChangeAction = ControlPropertyChangeActionType.DoNothing, TextMode = PropertyTextMode.MultiLine), Required(ErrorMessageResourceType = typeof(Core),...