Save and add new child directly

Forums vLooup for SharePoint Save and add new child directly

Viewing 0 reply threads
  • Author
    • #6514
      Alexander Bautz

      I got a question from William like this:

      So this is working great. Because the SPID is not created until the record of the parent is saved, I assume I cannot create child records when making a new parent item. So I have this case where I need to enter multiple child items related to a parent, is there a way to have something that would basically be a button or something that would “Save and add new child item” vs hitting the save button, finding the parent record in a long list and clicking create new child each time? Basically, what is the easiest way to create multiple child records?


      This can be done by adding this snippet of code to the child NewForm:

      <script type="text/javascript">
      if("SendMeBackToNewForm") === -1){
      	var nURL = location.href.split("&Source=")[0];
      	nURL += "&Source="+nURL.split("&").join("%26")+"%26SendMeBackToNewForm";
      	location.href = nURL;
      }else if("Source=") === -1){
      	location.href = location.href+"&Source="+location.href.split("&").join("%26");
      if(GetUrlKeyValue("ClickCancelBTN") === "1"){
      		location.href = location.pathname+"?ClickCancelBTN=1";

      Please note that this code requires jQuery to be loaded in the page. This should already be in place when you add the vLookup solution to the NewForm, but you must place this snippet below the jQuery script, but before the vLookup script is loaded.


Viewing 0 reply threads
  • You must be logged in to reply to this topic.