• How I created a “Copy to new item” functionality for a SharePoint list – Part 1

    I wanted to create a “copy to new item” functionality for a SharePoint list.

    Steps I came up with:

    1. The first thing I had to do was add a link to the context menu (I learned that it is called an ECB) and have it point to the NewForm.aspx.
    2. Once I got that, I could append a querystring variable to the url that contained the “Source ID” of the item to copy and the name of the current list.
    3. Then I would grab that querystring value on the other side – in the NewForm.aspx page
    4. Next I would use that variable to query the SharePoint List via SOAP
    5. Inject the results the  into the form

    Here is my script (add to a CEWP, I already have the jquery pointers to google in a Delegate control)

    <script language="javascript">
    function Custom_AddListMenuItems(m, ctx) {
    var editURL = window.location.protocol + "//" + window.location.host + ctx.listUrlDir + "/NewForm.aspx?SourceID=" + currentItemID + "&amp;ListName=" + ctx.ListTitle;
     CAMOpt(m, "Copy To New Item" ,"window.location=('" + editURL + "');" , "/_layouts/images/Copy.GIF");
     CAMSep(m);
    }
    </script>
    

    More to come.


  • How to get into Web Part Page Maintenance mode

    For when you screw up a CEWP with bad code, you can use the query string “contents=1” to remove the offending webpart.


  • How to add a webpart to a Sharepoint “NewForm.aspx”

    I wanted to put a hidden CEWP on top of a standard SharePoint input form (you know when you click “NEW” too add an item to a list). The edit page was grayed out. I added to the querystring “NewForm.aspx?ToolPaneView=2” and I can add the CEWP to the top of the page. Once I added that, the edit page option is no longer grayed out.


  • BASH (readline) keyboard shortcuts

    I was just in training and the instructor was a command line keyboard shortcut wizard. He was magically making words disappear and reappear. So i fond this list of shortcuts. Many of them did not work in my OS X BASH prompt.I fond I had to go into the terminal.app preferences and select “use option key as meta key” on the keyboard tab (it is at the bottom). Now I can add a few shortcuts to my repertoire.


  • ip_conntrack_ftp renamed to nf_conntrack_ftp?

    Have they renamed ip_conntrack_ftp? Is it now nf_conntrack_ftp?


  • I am a RHCE!

    Now I need to update my MCSE to MCITP


  • Create a blank floppy image in Mac OSX 10.6

    • dd if=/dev/zero bs=1024 count=1440 > floppy.img
    • Disk Utility -> File -> Open Disk Image -> floppy.img (you will get an error like no mountable filesystems)
    • Select floppy.img in Disk Utility, and the erase tab
    • Select MS-DOS FAT as the format.
    • Eject floppy.img

  • Install Windows 7 RSAT Silently and Activate All Features

    • wusa /quiet /norestart amd64fre_GRMRSATX_MSU.msu
    • ocsetup RemoteServerAdministrationTools;RemoteServerAdministrationTools-ServerManager;RemoteServerAdministrationTools-Roles;RemoteServerAdministrationTools-Roles-CertificateServices;RemoteServerAdministrationTools-Roles-CertificateServices-CA;RemoteServerAdministrationTools-Roles-CertificateServices-OnlineResponder;RemoteServerAdministrationTools-Roles-AD;RemoteServerAdministrationTools-Roles-AD-DS;RemoteServerAdministrationTools-Roles-AD-DS-SnapIns;RemoteServerAdministrationTools-Roles-AD-DS-AdministrativeCenter;RemoteServerAdministrationTools-Roles-AD-DS-NIS;RemoteServerAdministrationTools-Roles-AD-LDS;RemoteServerAdministrationTools-Roles-AD-Powershell;RemoteServerAdministrationTools-Roles-DHCP;RemoteServerAdministrationTools-Roles-DNS;RemoteServerAdministrationTools-Roles-FileServices;RemoteServerAdministrationTools-Roles-FileServices-Dfs;RemoteServerAdministrationTools-Roles-FileServices-Fsrm;RemoteServerAdministrationTools-Roles-FileServices-StorageMgmt;RemoteServerAdministrationTools-Roles-HyperV;RemoteServerAdministrationTools-Roles-RDS;RemoteServerAdministrationTools-Features;RemoteServerAdministrationTools-Features-BitLocker;RemoteServerAdministrationTools-Features-Clustering;RemoteServerAdministrationTools-Features-GP;RemoteServerAdministrationTools-Features-LoadBalancing;RemoteServerAdministrationTools-Features-SmtpServer;RemoteServerAdministrationTools-Features-StorageExplorer;RemoteServerAdministrationTools-Features-StorageManager;RemoteServerAdministrationTools-Features-Wsrm