getting blank ParentId of forumreply

Can any body let me know how can i get foremthreadid of a forumreply,

 $core_v2_forumReply.Get(934885).ParentId

when running above code getting blank , then my question is how we can get forumthreaadid of a forumreply

Parents Reply Children
  • Please try this in the script console to figure out if your reply is null.

    #set($reply = false)
    #set($reply = $core_v2_forumReply.Get(934885))
    #if ($reply) 
        Reply's Thread ID: $reply.ThreadId
    #else
        Reply does not exist.
    #end

    Assuming your reply ID is correct and the reply exists, then your original syntax approach would have still worked, though with ThreadId instead of ParentId. That said, it's better to have those kinds of null checks for safety anyway.

    $core_v2_forumReply.Get(934885).ThreadId