Jim Mathew's Sharepoint Blog (MOSS Techie from Abu Dhabi)

October 19, 2009

SharePoint Data View Conditional Formatting based on user permissions (IfHasRights)

Filed under: Code Snippets, Sharepoint Designer — Tags: — Jim Mathew @ 12:44 PM

Below are the values for conditional formatting

example usage : <xsl:if test=”ddwrt:IfHasRights(“REPLACE THIS WITH BELOW VALUE”)”><img alt=”" border=”0″ src=”../../PublishingImages/btn_AddActionItem.jpg” width=”191″ height=”37″ /></xsl:if>

ViewListItems – 1

AddListItems – 2

EditListItems – 4

DeleteListItems – 8

ApproveItems – 16

OpenItems – 32

ViewVersions – 64

DeleteVersions – 128

CancelCheckout – 256

PersonalViews – 512

ManageLists – 2048

ViewFormPages – 4096

Open – 65536

ViewPages – 131072

AddAndCustomizePages – 262144

ApplyThemeAndBorder – 524288

ApplyStyleSheets – 1048576

ViewUsageData – 2097152

CreateSSCSite – 4194314

ManageSubwebs – 8388608

CreateGroups – 16777216

ManagePermissions – 33554432

BrowseDirectories – 67108864

BrowseUserInfo – 134217728

AddDelPrivateWebParts – 268435456

UpdatePersonalWebParts – 536870912

ManageWeb – 1073741824

UseRemoteAPIs – 137438953472

ManageAlerts – 274877906944

CreateAlerts – 549755813888

EditMyUserInfo – 1099511627776

EnumeratePermissions – 4611686018427387904

FullMask – 9223372036854775807

To ensure that users only see the edit button if they are the author of the posting, or a site owner we added the following conditional formatting:

test=”ddwrt:IfHasRights(2048) or contains(@Author,$Userid)”

August 23, 2009

Display attachments in sharepoint dataview webpart using sharepoint designer

Filed under: Code Snippets, Dataview, Sharepoint Designer — Tags: , — Jim Mathew @ 1:58 PM

Use below code to show attachments in sharepoint dataview webpart .

Use this for Single List Item View:
<SharePoint:AttachmentsField ControlMode=”Display” ItemId=”{@ID}” EnableViewState=”true” FieldName=”Attachments”  runat=”server”/>

Use this for Multiple List item Vew:
<SharePoint:AttachmentButton ControlMode=”Edit” Enabled=”true” ItemId=”{@ID}” runat=”server” Visible=”false”/><SharePoint:AttachmentsField ControlMode=”Display” ItemId=”{@ID}” EnableViewState=”true” FieldName=”Attachments” runat=”server”/>

July 21, 2009

How to change choice field “allow fill-in choice” default text ‘Specify your own value:’ to custom text?

Filed under: Sharepoint Designer, Sharepoint List, Tips & Tricks — Jim Mathew @ 8:18 AM
  • Open default.master (found in the _catalogs\masterpages folder) in SharePoint Designer. 
  • Before the </HEAD> end tag I added the following js code:

<script type=”text/javascript”>
 function changeSpecifyOwnValue() {

  var node_list = document.getElementsByTagName(‘input’);
   
  for (var i = 0; i < node_list.length; i++) {
      var node = node_list[i ];  // NOTE: there is a space here after the i, if not a lightbulb was added… delete this
    
      if (((node.getAttribute(‘type’) == ‘radio’) && (node.getAttribute(‘value’) != ‘DropDownButton’)) || (node.getAttribute(‘type’) == ‘checkbox’)) {
          if (node.nextSibling.innerHTML==”Specify your own value:”) {
           node.nextSibling.innerHTML = “Other:”;
          }
      }
  }    

 }
</script>

After this I added the function above to be executed in the body onload, below is the sample usgae:

<BODY scroll=”yes” onload=”javascript:if (typeof(_spBodyOnLoadWrapper) != ‘undefined’) _spBodyOnLoadWrapper(); changeSpecifyOwnValue();”>

July 16, 2009

Error “This item cannot be deleted because it is still referenced by other pages”

Filed under: Error, Sharepoint Designer, Tips & Tricks — Tags: — Jim Mathew @ 7:43 AM

I was trying to delete a master page in SharePoint designer, and I got the error “This item cannot be deleted because it is still referenced by other pages”. This was strange. I got a quick solution from microsoft http://support.microsoft.com/kb/926812….but it was not worth.

This is a know bug….Here is a quick solution…Just 3 steps

  1. Create a sub-folder in Master page gallery
  2. Move the master page into the sub-folder
  3. Delete the sub-folder

Voila!

June 28, 2009

Integration of CA Unicenter Service Desk application with Sharepoint 2007 using XML Webservices

Filed under: Projects, Smart Part — Tags: , , — Jim Mathew @ 1:16 PM

This is my last project in MBC (Middle east Broadcasting Centre) developed for our IT/Engineering Service Desk. Our Service Desk is currently using a solution from Computer Associates (CA) called Unicenter Service DeskThis is a very successful product of CA  but  it’s usability experience is very bad.

As a quick solution myself and my team member Mr. Salih Abdul Rahman decided to use Sharepoint 2007 as  front end for Service Desk. we had brain storming sessions…..&….. finally  we explored Webservices provided by CA which was very helpful to incorporate with MOSS. so we developed all the forms and views using ASP.NET and made User controls and incorporated with sharepoint using smartpart. also created some graphics work(Sharepoint master page) to make the Usability experience much easier and richer. below is the screenshot of our SD Portal.

 This is a pure sharepoint site which is highly customized to integrate CA Service Desk application functionalities.

SD_Details

Place Log Comment / View Log History
sd2
Technologies Used


User Controls   :
   Visual Studio 2008 (ASP.NET .ascx)
Business Logis  :   XML Webservices
MOSS Integration  :  Smart Part
Scripts :    Jquery, CSS
Database:   SQl Server 2005
User interface design  :  Adobe Photoshop , Microsoft Expression

May 23, 2009

Attention: Important Information on Service Pack 2

Filed under: Bug, New Releases, Service Packs — Tags: , — Jim Mathew @ 9:29 PM

During the installation of SP2, a product expiration date is improperly activated. This means SharePoint will expire as though it was a trial installation 180 days after SP2 is deployed. The activation of the expiration date will not affect the normal function of SharePoint up until the expiration date passes. Read Full Article

May 12, 2009

SharePoint Server 2010 Preliminary System Requirements Announced

Filed under: New Releases, Sharepoint Server 2010 — Tags: , , — Jim Mathew @ 12:47 PM
  • SharePoint Server 2010 will be 64-bit only.
  • SharePoint Server 2010 will require 64-bit Windows Server 2008 or 64-bit Windows Server 2008 R2.
  • SharePoint Server 2010 will require 64-bit SQL Server 2008 or 64-bit SQL Server 2005.

Read full story here

April 17, 2009

Next Version of Sharepoint will be known as Microsoft SharePoint Server 2010…. no more MOSS

Filed under: New Releases, Sharepoint Server 2010 — Tags: , , — Jim Mathew @ 9:37 AM

Microsoft took the name ”OFFICE” out from Microsoft Office Sharepoint Server (MOSS) for next version to avoid confusion for customers. The new official name of  Sharepoint 14 will be MICROSOFT SHAREPOINT SERVER 2010

Read the exclusive updates from microsoft sharepoint team blog

April 15, 2009

Code Snippet: How to get client machine name?

Filed under: ASP.NET, Code Snippets, Tips & Tricks — Tags: , , — Jim Mathew @ 11:01 AM

I had a requirement to get client’s machine name   using smartpart user control in sharepoint . i have tried number of methods but unfortunately those show server name only.

here  is the code which works fine.

Dim host As  System.Net.IPHostEntry

host = System.Net.Dns.GetHostEntry(Request.ServerVariables.Item(“REMOTE_HOST”)) 

Dim strComputerName As String = host.HostName

label1.text= strComputerName

April 14, 2009

My much awaited project: Online Bill payment system for AbuDhabi Water and Electricity Authority (ADWEA) using Sharepoint 07 + Oracle CC&B is ready to launch

Filed under: ASP.NET, Development, Oracle, Projects, Smart Part, User interface — Tags: , , — Jim Mathew @ 11:18 AM

This was one of the big project i ever been worked when i was working with LETS (Emirates National Oil Company’s (ENOC)-IT Division)…This is a complete Multilingual Online Bill payment system for AbuDhabi Water and Electricity Authority (ADWEA) built on top of Sharepoint 2007 (as front end) and Oracle Customer Care Billing system -CC&B (as Back end). My role in this project was  Solution Architect & User Experience Lead…This project is actually  divided in to two projects (mainly two sub clients)…One for AbuDhabi Distribution Company & other one is AlAin Distribution Company . so serving Abu Dhabi & AL Ain customers with two different site collections + same functionality with their custom branding.
below are some screen shot of two projects:

magic of  Sharepoint 2007 +  Oracle + Smartpart Usercontrols

AlAin Distribution Company Online Bill Payment  System  – English Version

aadc

AlAin Distribution Company Online Bill Payment  System - Arabic Version

aadc_ar

Abu Dhabi Distribution Company Online Bill Payment  System  - English Version

addc_en

Abu Dhabi Distribution Company Online Bill Payment  System - Arabic Version

addc_ar

Older Posts »

Blog at WordPress.com.