question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enhancement: Add option to push Content Type changes to children

See original GitHub issue

When using the spo contenttype set command, the changes are not pushed to child contenttypes if you execute them on site level.

The purpose of this issue is to add a flag --updateChildren to force the changes to be saved to the child types.

Option Description
--updateChildren Use this flag to update child content types as well.

Additional Info

With the REST Api we can use the Update function on Content Type level to do so:

/_api/Web/ContentTypes('0x01')/update(true)

Pushes the changes on the content type to the children.

Update: the update(true) function cannot be used as far as we can see. We’ll be switching this command to use the older list.svc API.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
martinlingstuylcommented, Nov 14, 2022

I think we’d best conform to the way this is handled in other places: only push the current changes. We’d need to add a big note to the docs of course.

I’m sure that the /Update(true) REST API endpoint can be used in the same way. We just don’t know how precisely. Posting a regular JSON body does not do anything.

In the meantime I’ve asked a lot of people at Microsoft how the Update(boolean) function in the SP REST Api works. The conclusion is that nobody knows for real sure, but that it seems the Update function is not really supported in the REST Api. It’s like it’s generated based on the availability of the code for CSOM. It seems like you cannot use it in the same way as with CSOM.

In short, I’ll be updating the command to use the older API.

2reactions
Adam-itcommented, Nov 4, 2022

great job @martinlingstuyl 🤩 I think we may go with the older API /_vti_bin/client.svc/ProcessQuery 🤔 There are already places that it is used I think 🤔 different approach would be to wait maybe for the v2 to support all properties 🤔

Read more comments on GitHub >

github_iconTop Results From Across the Web

Updating Child Content Types | Microsoft Learn
When you make changes to a site content type, you can push down those changes to all its child content types, either through...
Read more >
Publish Content Type in SharePoint using PowerShell
How to push changes from Content Type Hub to Site Collections immediately? Once the content type is published, it may take up to...
Read more >
6.1. Adding a Content Type | Chapter 6. Setting Up ... - Drupal
In the Manage administrative menu, navigate to Structure > Content types (admin/structure/types). · Click Add content type. · Under Submission form settings, ...
Read more >
list - managing the relationship between Parent and its child ...
When working with parent/child content types, I do this: The parent has only the fields that will exist in all child content types....
Read more >
Set up enhanced conversions for web manually with Google ...
You can set up enhanced conversions with minor or no changes to your tagging configuration, in one of two ways: using Google Tag...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found