Posts

Showing posts from August, 2011

Override the render function of the SharePoint content editor WebPart

Image
Had you come across on Bug of the SharePoint Content Editor WebPart So there is interesting problem If using external links and internal links – you will get the bug An example to the bug: Try This - Internal links, external links and internal links again What we get is the first two links work correctly, but the third link will link us to link the internal server name we have created the site. This is big bug for CEWP. Hope you understood the bug. How do we solve it? You can not inherit the WebPart - then shall we do? Built Control Adapter performs render the code. Create a small project in Visual Studio that contains the following code using  System; using  System.Collections.Generic; using  System.IO; using  System.Text; using  System.Web.UI; using  Microsoft.SharePoint; using  Microsoft.SharePoint.Administration; namespace  Roi.Moss.ControlAdapter.ContentEditorWebPart {   public   class   Conte...

There was an exception running the extensions specified in the config file. ---> Maximum request length exceeded.

Image
Have you ever encountered the following message when you try to transfer large data in web service ? There was an exception running the extensions specified in the config file. ---> Maximum request length exceeded. :) All you need to do is: Access to the remote server where the is WebService. Go to the web.config and set the tag httpRuntime the following code on the " system.web " tag. < system.web >   < httpRuntime executionTimeout = " 999999 " maxRequestLength = " 51200 " > ... Roi

How to Create a validation to a list form for "Attach File" for SharePoint

Image
Sometimes the little code - works! How to do on MOSS 2007 list form a requirement to the attach field ?   Let build up a validation in JavaScript The following JS code do it perfectly. All you need is access to the SharePoint Designer . Edit the form ( NewForm.aspx or EditForm.aspx ). Find a good place to insert the code in the list form, And Copy-Paste the code: < script   type ="text/javascript"   language ="javascript> function  PreSaveItem() {   var  elm = document.getElementById( "idAttachmentsTable" );   if  (elm ==  null  || elm.rows.length == 0)   {     alert( "Please attach a document to the request" );     return   false ;   }   if  ( "function"  ==  typeof  (PreSaveAction))   {     return  PreSaveAction();   }   ...

Failed to extract the cab file in the solution / Root element is missing

Image
Did you encounter the following error message? Failed to extract the cab file in the solution. I came across this message - in my case it was install a solution . Another problem I had with the solution Root element is missing. After thorough testing - I found the solution The Size of File wss.xsd was 0k Is the stsadm command uses this file ????.... Yes! All you need do is to copy from server that work correctly the file wss.xsd. Those who do not know the file is sitting in 12Hive \TEMPLATE\XML for MOSS 2007 14Hive \TEMPLATE\XML for SharePoint 2010 The file is responsible for all schema of the SharePoint . Hope I helped, Roi Kolbinger

How to get updates of changes to the database

Image
Have you ever encountered in developing longer and you do not remember what you did and what updated and created. No - then you can not continue reading the article. If so - and also worked with a database ... So probably you wanted to know what you did (and don't remember) Here's a query that returns all the tables,views,stored procedures and functions which have changed in the last 30 days (you can change 30 to any number) set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go -- ============================================= -- Author:         Roi Kolbinger -- Create date:   02/08/2008 -- Description:    Get tables,views,stored procedures and functions that modified for 30 days -- ============================================= ALTER PROCEDURE [dbo] . [GetAllDBDetails] AS BEGIN -- ======================views======================= SELECT name AS view_name   , SCHEMA_NAME ( schema_id ) ...