locked
Perform custom action on clicking OK in EditForm.aspx of a document library RRS feed

  • Question

  • Hi,

    My requirement is to perform custom action in EditForm.aspx of a document library. There is a date column created in the document library. When i click on OK, the modified date of the item should get assigned to the date column. Is this acheivable ?

    Friday, April 1, 2011 7:48 PM

Answers

  • Hi Nagarajan,

    You can use either SPListItemReceiver (ItemUpdating or ItemUpdated event) or simple Workflow to update your custom column.

     


    Regards, Avinash | avinashkt.blogspot.com
    • Marked as answer by Leoyi Sun Friday, April 8, 2011 9:27 AM
    Thursday, April 7, 2011 8:26 AM
  • For this requirement ,You have  to use a SharePoint Designer work flow on Item Editing,Update list item method you can use
    Destin -MCPD: SharePoint Developer 2010, MCTS:SharePoint 2007 Application Development
    • Marked as answer by Leoyi Sun Friday, April 8, 2011 9:27 AM
    Thursday, April 7, 2011 11:38 AM

All replies

  • Hi,

    It is possible to achieve this using SharePoint Designer (free download).

    You will have to create a new copy of the Editform.aspx to do this.

    1. Drag-N-Drop a Form Action Button control.
    2. Right Click on the button to select Form Action.
    3. In the dialog box click on custom settings Click on Settings once you add the custom settings.
    4. This will take you to the workflow designer.

    It is going to be a single step workflow specifying the custom list, the variable and mapping on the form fields in the action item of the workflow.

    hth,


    -- techChirag
    Friday, April 1, 2011 9:40 PM
  • Why keep duplicate records in the list? You already have the "Modified" column. What are you trying to achieve?

     


    Pman
    http://www.pmansLab.com/
    Saturday, April 2, 2011 5:50 PM
  • Only when a user edits a document content, i would like to keep the custom date column unchanged. When there is change in other meta-data i wanted the custom date to be equal to the modified date. Based on this iam running a custom program to categorize the documents.
    Monday, April 4, 2011 3:57 PM
  •  

    techChirag,

    iam unable to add the Form Action Button control. It does not allow me. Do you mean the button that is available under "sharepoint controls" or the regular ASP.Net control button.

    Monday, April 4, 2011 3:59 PM
  • Hi,

    Can i default the value of custom date column to either Modified datetime OR the current system datetime using formulas ?

    Monday, April 4, 2011 8:19 PM
  • Hi Nagarajan,

    You can use either SPListItemReceiver (ItemUpdating or ItemUpdated event) or simple Workflow to update your custom column.

     


    Regards, Avinash | avinashkt.blogspot.com
    • Marked as answer by Leoyi Sun Friday, April 8, 2011 9:27 AM
    Thursday, April 7, 2011 8:26 AM
  • For this requirement ,You have  to use a SharePoint Designer work flow on Item Editing,Update list item method you can use
    Destin -MCPD: SharePoint Developer 2010, MCTS:SharePoint 2007 Application Development
    • Marked as answer by Leoyi Sun Friday, April 8, 2011 9:27 AM
    Thursday, April 7, 2011 11:38 AM