How to copy one record to another form?


  • I'm using SharePoint online.

    There's a product information view with column: Product Name, Description, Created Time.

    User want to select one record, click one link "Copy" to open a new form, preview product's Product Name, Description are inheritted to show in the new form. Created Time is created automatically instead of coming for preview product.  How could I do it?

    Wednesday, January 11, 2017 5:04 PM

All replies

  • Hi Lillian,

    One of the way to achieve this would be by creating a simple custom action from SharePoint designer  and use rest api, jQuery to populate the defaults  or the values from the product information list. 

    1. Create a simple custom action give the Name as "Copy" and chose the option of "Navigate to URL" and provide the value as [javascript:OpenPopUpPageWithTitle('https://somedomain/Lists/somelistname/NewForm.aspx?ProjectId={ItemId}', RefreshOnDialogClose, 750, 750,'New List Item')].  You can give the url as the destination list new form URL.
    2. As the second step use rest api to get the detail from the Project Id populated in the query string. Example: "/_api/web/lists/getbytitle('Projects')/Items('ProjectId')". Process the response and assign it to  desired fields OR placholders.

    Please remember to mark the replies as answers if they help.

    Wednesday, January 11, 2017 5:29 PM