locked
Write to the Service Request Activity log via runbook RRS feed

  • Question

  • I'm sure I am missing something obvious here.

    Using a runbook that has been launched via a Runbook Automation Activity, how does one write to the related Service Request's Activity log?

    Wednesday, April 3, 2013 8:10 AM

Answers

  • Hi,

    To do this you can use the "create related object". something like this :


    Best Regards Rémy BOVI

    • Proposed as answer by BOVI Rémy Wednesday, April 3, 2013 5:20 PM
    • Marked as answer by Adrian Salone Thursday, April 4, 2013 8:48 AM
    Wednesday, April 3, 2013 12:42 PM
  • Hi Adrian.

    Bovi Remy is correct, this does work nicely.  Just remember that the ID property for the Activity Log is a GUID, therefore you will probably need to use a little PoSh to generate this.  I used the following code:

    $AnalystCommentGUID = [System.Guid]::NewGuid().ToString()

    HTH

    Cheers

    Shaun

    • Marked as answer by Adrian Salone Thursday, April 4, 2013 8:48 AM
    Wednesday, April 3, 2013 6:30 PM
  • Hi,

    The properties are :

    Hi,


    Best Regards Rémy BOVI

    • Proposed as answer by BOVI Rémy Thursday, April 4, 2013 7:58 AM
    • Marked as answer by Adrian Salone Thursday, April 4, 2013 8:48 AM
    Thursday, April 4, 2013 7:58 AM

All replies

  • Hi,

    To do this you can use the "create related object". something like this :


    Best Regards Rémy BOVI

    • Proposed as answer by BOVI Rémy Wednesday, April 3, 2013 5:20 PM
    • Marked as answer by Adrian Salone Thursday, April 4, 2013 8:48 AM
    Wednesday, April 3, 2013 12:42 PM
  • Hi Adrian.

    Bovi Remy is correct, this does work nicely.  Just remember that the ID property for the Activity Log is a GUID, therefore you will probably need to use a little PoSh to generate this.  I used the following code:

    $AnalystCommentGUID = [System.Guid]::NewGuid().ToString()

    HTH

    Cheers

    Shaun

    • Marked as answer by Adrian Salone Thursday, April 4, 2013 8:48 AM
    Wednesday, April 3, 2013 6:30 PM
  • Thanks for the reply.  One further request - could you please publish the properties of your Add Log step?  (i.e. what class of object am I creating?)
    • Edited by Adrian Salone Thursday, April 4, 2013 1:10 AM edit typo
    • Marked as answer by Adrian Salone Thursday, April 4, 2013 8:48 AM
    • Unmarked as answer by Adrian Salone Thursday, April 4, 2013 8:48 AM
    Thursday, April 4, 2013 12:57 AM
  • Hi,

    The properties are :

    Hi,


    Best Regards Rémy BOVI

    • Proposed as answer by BOVI Rémy Thursday, April 4, 2013 7:58 AM
    • Marked as answer by Adrian Salone Thursday, April 4, 2013 8:48 AM
    Thursday, April 4, 2013 7:58 AM
  • Thanks very much - this is precisely what I was after.

    I was getting tripped up by your use of the "Create Related Object" activity.  For some reason I saw it as "Create Object"...(and now that I re-read your post, it does indeed say "Create Related Object").

    Again, thanks very much.

    Thursday, April 4, 2013 8:50 AM