Changing ContentTypeId in URL for DispForm.aspx not changing the form

  • 7 April 2021
  • 0 replies
  • 35 views

Badge

I am trying to change the form on a button click by forming URL and adding ContentTypeId to it.
It works perfectly fine when the form mode is New or Edit, but when I try to do same for DispForm, it doesn't change the form despite showing new ContentTypeId in the URL.
Below is snippet what I am doing on button click - 

window.location.href=<siteurl>+"/Lists/<ListName>/DispForm.aspx?ID=123&ContentTypeId=<ContentTypeId>";

 


0 replies

Be the first to reply!

Reply