Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Philip Hayton 98 posts 435 karma points
    Sep 05, 2022 @ 17:01
    Philip Hayton
    0

    How to access Umbraco Node Id from Content(xt) app?

    Hi Matt,

    Sorry I think I'm going to be pestering you a bit over the coming days...

    I have a content app that renders a collection of 'events' linked to an Umbraco node. These are just simple POCOs that store a bit of data, nothing fancy.

    The foreign key for the ContextApp is set to a field called ExternalId, however when I create a new event through the content app the ExternalId is always the default value and I can't figure out where to get + set that value from.

    As always your help is greatly appreciated.

    Kind regards

    Phil

    enter image description here

    enter image description here

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Sep 06, 2022 @ 07:34
    Matt Brailsford
    100

    Hey Phil,

    What value type is your external ID? it looks like a Guid, but Konstrukt assumes a string as it will give you a UDI for the content item, not the Guid key. This is to ensure the values remain set across cloud environments (if you are using them).

    Hope this helps

    Matt

  • Philip Hayton 98 posts 435 karma points
    Sep 06, 2022 @ 08:59
    Philip Hayton
    0

    Ah that makes perfect sense, no problem I'll convert it to a string.

    Thanks Matt.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies