How to select the existing interaction by JavaScript

Hi experts,

 

Does anybody know how to select the existing interaction by JavaScript?

 

What I am trying to do is that

 

1. Click duplicate interaction button

2. Swith the view from the source to the duplicated interaction.

 

I would like to know how to make it realize 2. by JavaScript.

 

Thanks.

Parents
  • Verified Answer

    Hi,

     

    I suggest you to create an object variable type incidents and then through the function doSelect() get the specific interaction.

     

    var fIncident=new SCFile("incidents");
    var query="incident.id=\"" <sdNumber> "\"";
    rc=fIncident.doSelect(query);

    if (rc != RC_SUCCESS)
    {
       print("Open time:  " fIncident.open_time);
    }

     

    You could use SCFILE_READONLY and function setFields to make the query more efficient.

     

    Regards,

     

Reply
  • Verified Answer

    Hi,

     

    I suggest you to create an object variable type incidents and then through the function doSelect() get the specific interaction.

     

    var fIncident=new SCFile("incidents");
    var query="incident.id=\"" <sdNumber> "\"";
    rc=fIncident.doSelect(query);

    if (rc != RC_SUCCESS)
    {
       print("Open time:  " fIncident.open_time);
    }

     

    You could use SCFILE_READONLY and function setFields to make the query more efficient.

     

    Regards,

     

Children