Copied to clipboard

Flag this post as spam?

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


  • MuirisOG 382 posts 1284 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 1082 posts 6449 karma points MVP 6x 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 382 posts 1284 karma points
    Oct 18, 2016 @ 09:49
    MuirisOG
    1

    That is perfect, many thanks Dennis!

  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    Oct 18, 2016 @ 10:33
    Dennis Adolfi
    0

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

Please Sign in or register to post replies

Write your reply to:

Draft