Dialog Custom Routing to FormSetID

This seems to have been asked a couple of times, but i just can't get it to work.

I used to Custom Routing Code if found here(Redirect to a specific formset edit page - #4 by mnikitina):

const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
//FormID is the name of teh query parameter
const formSetId = urlParams.get('FormID');
console.log(queryString);

if(formSetId){
  return formSetId ;
}

And added the FormID parameter to the URL:

https://sharepoint.com/sites/subsite/_layouts/15/listform.aspx?PageType=6&ListId=listID&ID=1&FormID=5fffbc66-6d9c-4afe-ad5a-0844995f5ec5

It just logs the ItemID as parameter and redirects to the default form, throwing the no formset found error.

What am I missing here?

Best whishes
Nico

Dear @nI3o,
But the console.log(queryString); shows the correct value, right? Are you sure that the ID matches the one for the Form Set and the form is saved for the Form Set?

Dear @Nikita_Kurguzov,
This is the console output i get:

?item=1
Error: Custom function has returned invalid result.
Error: No matching form sets found.

I tried a different way.
"https://sharepoint.com/SitePages/PlumsailForms/Wartungen/Element/EditForm.aspx?FormID=5fffbc66-6d9c-4afe-ad5a-0844995f5ec5&item="+fd.itemId

This works and i get the correct console output. For now this is fine for me.

1 Like