I have link from each item in one SharePoint list to add the item to the second list. The link from the first list is a calculated field with query string at the end that opens a new item form on the second list. The link ends with /NewForm.aspx?ID=6&Source=http://…
I would like for the ID number to be saved in the new list in a field called CatalogID, the form to automatically be saved and the user directed to the URL specified in the source value in the URL. This all works with a manual save, but when I add a trigger save function into custom JS, the record saves, but without the value in the CatalogID field. Any thoughts on how to achieve the behavior and allow the URL to be read and value saved? The entire code for custom JS that I am using is:
var fields = init_fields_v2();
var yourQueryStringVal = GetUrlKeyValue(“ID”);
setFieldValue(“CatalogID”,yourQueryStringVal);
spjs.dffs.triggerSave();