Copied to clipboard

Flag this post as spam?

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


  • MuirisOG 378 posts 1277 karma points
    Oct 17, 2016 @ 16:46
    MuirisOG
    0

    Is it possible to capture the node id after saving a new media item

    Hi everyone,

    I would like to know the node ID immediately after saving a new media item, as I would like to do some post-processing on it.

    Is this possible?

    e.g. (in pseudocode),

    newNodeId =  mediaservice.Save(newMediaItem)
    
  • Dennis Adolfi 1072 posts 6378 karma points MVP 2x c-trib
    Oct 17, 2016 @ 18:16
    Dennis Adolfi
    100

    Hi Muiris.

    The MediaService.CreateMedia() methods returns a object which should get a value for the Id as soon as you save the object. Like: @mediaItem.Id.

  • MuirisOG 378 posts 1277 karma points
    Oct 18, 2016 @ 09:49
    MuirisOG
    1

    That is perfect, many thanks Dennis!

  • Dennis Adolfi 1072 posts 6378 karma points MVP 2x c-trib
    Oct 18, 2016 @ 10:33
    Dennis Adolfi
    0

    Awesome, glad I could help Muiris! Have a great day! :)

  • 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