IT Process Automation

  • 1.  need to updat change property

    Posted Jan 11, 2017 04:35 AM

    hi there, I need to update change property using update object operator. my goal is to update the change property if user done some editing using pam task.

    kindly suggest appropriate solution

    prompt response is required.



  • 2.  Re: need to updat change property
    Best Answer

    Posted Jan 11, 2017 01:26 PM

    Hi Ahkan, this question is relative to ServiceDesk more than PAM but here we go :

     

    Property is a distinct object, related to a change.

     

    If you look into the web screen painter, you can see the object "prp", wich is a property.

     

    You can then look for its attribute : "object_id", wich is a SREL to the object "chg".

     

     

    So in order to update a property, you need to have the "persistent_id" (handle) of your change.

    You also need a value to identify wich property you want to update. (MAy i suggest the "sequence" attribute since you cannot have two properties with the same sequence in a change). With both of these values, you can do a doSelect on prp, where object_id = your change persistent_id and sequence= your sequence to get your property's persistent_id.

     

    Or, if you already have every properties in a user form in PAM, think of getting the handle for each properties when building the user form.

     

    When you have this, take a look at the method "updateObject".

     

    updateObject
    (int sid, String objectHandle, ArrayOfString attrVals, ArrayOfString attributes)
    String
    [UDSObject]
     Updates one or more attributes for a given object.

    SID : session id, obtained with login method

    objectHandle, the "persistent_id" of the property. 

    attrVals : a key/value string array. in your case, if you only want to update the value, the array will look like ["value",Process.newPropertyValue]

    attributes : The attributes you want as a return. Returns every attributes if not specified.If you need nothing, simply add ["id"] to return a single attribute.

     

     

    Good luck.