0

I'm trying to figure out how to setup site custom fields, to be retrieved from React webparts.

Doing some research, I've found several articles talking about Property Bags, like this one which seems satisfying my needs, but my question is: supposing to setup a property bag for a site (PowerShell is the only way?), is then retrievable by webparts deployed on that site?

Could you please give me an example/link, on how to retrieve this information in a React Webpart?

Thanks in advance.

5
  • Thanks @MartinIszac: the first link seems a little old and in plain JS (no React) and the second one is the same I posted in my question...
    – caneta
    Commented Feb 6 at 8:04
  • As admin, is it possible to create a property bag via web interface on a tenant?
    – caneta
    Commented Feb 7 at 10:19
  • There is a pnpcore open source library, and they do web properties: pnp.github.io/pnpcore/using-the-sdk/… so maybe looking at the code behind you can get some ideas... Commented Feb 11 at 15:45
  • Also - maybe this workaround can help - instead of getting properties for a specific site you might get sites where this property is set up to specific value. The last is possible when a property is setup as indexed, and at search service you mapped crawled property to refinable string and you use search api with an $entityTypes = "['site']" and query like "* refinablestring125='myvalue'" Commented Feb 11 at 15:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.