Freigeben über


How to hide Send To Records Center menu option in MOSS?

MOSS delivers a Records Center site template which can be used for records managment, but once this is configured every user in the farm will be able to send documents to Records Center by using the context menu Send To -> Records Center. This is usually not desired since enterprise would normall develop a systematic way of submitting records through workflows, event handlers, etc.

 

To hide Send to Records Center menu option, I've listed out 2 options.

Option #1: quick but need to watch out for SP install to avoid changes being overidden.

1. Go to c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033, locate CORE.js, make a copy of the file and save it in another place for backup purpose.

2. Open core.js in Notepad, search for "officialfilename" and comment out the line that says "CAMOpt" in the "if block" by inserting "//" in front of the line. Save the file. The code should look like the following after the change:

            if (ctx.OfficialFileName !=null && ctx.OfficialFileName !="")

                        {

                                    strDisplayText=ctx.OfficialFileName;

                                    strAction="STSNavigate('"+ ctx.HttpRoot+ "/_layouts/SendToOfficialFile.aspx?"+ "SourceUrl="+ currentItemEscapedFileUrl+ "&Source="+ GetSource()+"')";

                                    strImagePath="";

                                    //CAMOpt(sm, strDisplayText, strAction, strImagePath);

                        }

3. IISReset to force client cache refresh.

Option #2: more deployable and can control which sites the change is applied to.

1. Go to c:P\rogram Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033, locate CORE.js, open core.js in Notepad, search for "officialfilename". Copy the entire javascript function and paste it to a new file called something like CORE_custom.js and make the same changes as in option #1.

2. In SharePoint Designer, open the site where you want the change to be applied. Create a custom master page with the following change:

 

<SharePoint:ScriptLink language="javascript" name="core.js" Defer="true" runat="server"/>

 <SharePoint:ScriptLink language="javascript" name="core_CUSTOM.js" Defer="true" runat="server"/>

3. In your site, go to site settings and Master Page, then apply the custom master page.

Comments