Close related Quote when interaction is closed

Hi Experts,

we are having HP service manager 9.35.

I'm stuck in a issue :

A SD (interaction) has a related Quote.

I'm trying to close the quote which is in last phase, when the SD (interaction) is closed. Which is happening perfectly by a script placed in trigger records of incidents.

Now the issue is when I'm closing the SD from a connect-it scenario created , it is closing the interaction, but not the related Quote record. Manually which is happening as mentioned above.

I have tried placing the script in Display options , Process record but the script of closing quote record is not getting executed when the connect it scenario is executed.

I don't want to place the script in schedular since to avoid performance issue, may be use it as last resort.

Any help in this regard is appreciated.

Kindly suggest


  • Hello,

    Does the CIT scenario use eventin records or web services to close the SD?


  • Hi PLP,

    Im using HPSM Web services connector,

    Extacess record look like as below:



    Trigger script:

    Trigger Name: QuoteStatus

    Table Name: incidents

    Trigger Type: 4 - After Update

    if (vars.$"Closed")
    var frelation = new SCFile("screlation");
    var findquote = frelation.doSelect('source="' vars.$file.incident_id '" and source.filename="incidents" and depend.filename="ocmq" and"true"');
    //print ("SR no. related to" " " vars.$file.incident_id " is" " " frelation.depend )

    if (findquote == RC_SUCCESS)
    var srvreq = new SCFile("ocmq");
    var matchreq = srvreq.doSelect("number=\"" frelation.depend "\"")
    oldstat = srvreq.zstatus;
    if (matchreq == RC_SUCCESS)
    srvreq.zstatus = "closed";
    var z = system.vars.$update_action.toArray();
    //print( "The update action field array contains the following: " z );
    var a = srvreq.comments.toArray();
    //print( "The comments field array contains the following: " a );
    //print( "Pushing first array entry..." );
    var d = new XMLDate( system.functions.tod());
    var datestamp = d.getSCDateTimeString();
    var usr=system.functions.operator()
    srvreq.comments.unshift( z);
    srvreq.comments.unshift("*** " datestamp "(" usr ") ***" "Update From Customer");
    newstat = srvreq.zstatus;
    //print ("Quote status has been changed from " " " oldstat " " "to" " " newstat)
    }while (frelation.getNext() == RC_SUCCESS)


    The script is executing fine when manually I'm closing the incident or saving the incident, in turn it is closing the related quote, but not when SD is closed through connect it scenario. kindly suggest what I'm missing here.



  • Hi Folks,

    Any sugestions !!





  • Hi All,

    The issue is partially resolved as in the sm.log file I can see the error:

    "ERROR Type Error system.vars.$update_action.toArray() has no properties at Char 1"

    I used it like var z = "closed from user"   // hard coded the comments.

    post this when the Connect It scenario is it is closing the Quote record as well.

    But what is way forward in order to resolve this issue.

    Kindly suggest



  • Hello,

    Could you please provide a debug log file with these parameters.