I have a JavaScript that relies on the contentTypeId when editing a folder or a document. The problem is when I click on the Edit properties ribbon:


Everything is all well and good The url:


as it manages to get the contentTypeId that I wanted.

However when pressing the Edit button from the view:

enter image description here

The URL won't contain contentTypeId and I cannot understand why.

Is there any explanation on why this is happening?


This is by design in SharePoint Library/List.

However you have below two options to edit the document properties:

  1. By selecting Edit Properties from ribbon.
  2. By selecting ellipses(...) after file name in view and then selecting Properties.

And If Edit button in view is breaking your functionality the you can remove this from list. For this follow below steps:

  1. Go to Library.
  2. Then Go to Library settings.
  3. Select the view you want to change.
  4. Un-check the checkbox near Edit (link to edit item).
  5. Click OK.
  • Can I somehow make a custom button instead of the Edit button which points to the Edit properties ribbon? – ProgrammerN23312 Aug 14 '19 at 11:07
  • Maybe you can try Client Side rendering(CSR)/JSLink option to customize your view. Just a Hint. I don't have ready made code for this. – Ganesh Sanap Aug 14 '19 at 11:10
  • Hmm tbh i was thinking of maybe getting the ContentTypeId in another way rather then from the url. i'm fairly new to this so i'm gonna look if i'm able to do this. – ProgrammerN23312 Aug 14 '19 at 11:13
  • Are you using ContentTypeId on EditForm.aspx in your custom code? – Ganesh Sanap Aug 14 '19 at 11:16
  • Yes, I basically want to check if the folder is a client folder or something else. If it's a client folder i want a button to be visible. This button basically kicks up a workflow which updates permissions for that folder. – ProgrammerN23312 Aug 14 '19 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.